Question on threads

Jonathan Shao jzshao1 at gmail.com
Fri Apr 11 21:16:29 CEST 2008


Hi all,

I'm a beginner to Python, so please bear with me.

Is there a way of guarenteeing that all created threads in a program are
finished before the main program exits? I know that using join() can
guarentee this, but from the test scripts I've run, it seems like join()
also forces each individual thread to terminate first before the next thread
can finish. So if I create like 20 threads in a for loop, and I join() each
created thread, then join() will in effect cause the threads to be executed
in serial rather than in parallel.

~ Jon

-- 
"Perhaps we all give the best of our hearts uncritically, to those who
hardly think about us in return."
~ T.H.White
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080411/246b52f4/attachment.html>


More information about the Python-list mailing list