スレッドが完了したかどうかを確認するにはどうすればよいですか?次のことを試しましたが、スレッドがまだ実行されていることがわかっていても、threads_listには開始されたスレッドが含まれていません。
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