Idle wait for outstanding threads?

Duncan Booth duncan at NOSPAMrcp.co.uk
Thu Jan 31 03:57:52 EST 2002


alanmk at hotmail.com (Alan Kennedy) wrote in 
news:f72dac0d.0201300518.35860565 at posting.google.com:

> From a main thread, I start a number of threads to execute some
> service, say some database queries. I want the main thread to wait
> until all of the service threads are complete before continuing.
> 
Just call the join method on each thread you want to have completed. It 
doesn't matter if they terminate in a different order than you join them.


-- 
Duncan Booth                                             duncan at rcp.co.uk
int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3"
"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?



More information about the Python-list mailing list