How do I know when all threads are done?

John Nagle nagle at animats.com
Wed May 21 22:36:30 EDT 2008


Zerge wrote:
> I can launch threads just fine, but then I have to do a time.sleep(n)
> so the main thread from which they where launched will wait for all
> the threads to return.
> 
> How can I detect when all threads are done and then return control to
> the main threads?
> 
> Thanks for your help

     Use "join".

				John Nagle



More information about the Python-list mailing list