Idle wait for outstanding threads?
Erno Kuusela
erno-news at erno.iki.fi
Wed Jan 30 10:17:02 EST 2002
In article <f72dac0d.0201300518.35860565 at posting.google.com>,
alanmk at hotmail.com (Alan Kennedy) writes:
| Greetings All,
| I'm trying to figure out how to do an idle wait while waiting for a
| number of threads to finish. The scenario is as follows.
| 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.
how about:
for t in service_threads:
t.join()
-- erno
More information about the Python-list
mailing list