[pygtk] Wait until a thread is ended
Jarek Zgoda
jzgoda at o2.pl
Fri Sep 29 04:21:23 WST 2006
abel deuring napisał(a):
> t = threading.Thread(target=threadfunction)
> t.start()
>
> while t.isAlive():
> print "waiting for thread"
> time.sleep(1.2)
Other idea is waiting until threading.activeCount drops below 2, i.o.w.
you get only one active thread and this is a main thread (this may be of
some use if you spawn more than one worker thread).
See: http://docs.python.org/lib/module-threading.html
--
Jarek Zgoda
http://jpa.berlios.de/
More information about the pygtk
mailing list