Python: ist der thread noch läuft

Wie sehe ich, ob ein thread abgeschlossen ist? Ich habe Folgendes versucht, aber threads_list nicht enthalten ist der thread, der gestartet wurde, auch wenn ich weiß, der thread läuft immer noch.

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
InformationsquelleAutor user984003 | 2013-02-25
Schreibe einen Kommentar