How can I see whether a thread has completed? I tried the following code:
import thread
import threading
id1 = thread.start_new_thread(my_function, ())
#wait some time
threads_list = threading.enumerate()
# Want to know if my_function() that was called by thread id1 has returned
def my_function()
#do stuff
return
but threads_list does not contain the thread that was started, even when I know the thread is still running. Can anyone help me solve this issue?