Question on threads
jzshao1 at gmail.com
Fri Apr 11 21:16:29 CEST 2008
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.
"Perhaps we all give the best of our hearts uncritically, to those who
hardly think about us in return."
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list