You have a signature start_new_thread . You call myproc and pass the result as an argument to start_new_thread , which never happens since myproc never ends.
Instead, it should be:
thread.start_new_thread(myproc, (thing,) )
The first argument is a function (i.e., the function object that does not call the function), and the second is a tuple of arguments.
See: https://docs.python.org/2/library/thread.html#thread.start_new_thread
Once your program starts both threads, you probably want to add a pause at the end, because the threads will stop when the main thread ends.
Also, consider using the threading module instead of the thread module, as it provides a much more convenient higher-level interface, such as a convenient way to wait until your threads complete.
See: https://docs.python.org/2/library/threading.html#module-threading
SpoonMeiser
source share