Zerge schrieb:
> 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?
import threading
threads = []
threads.append(threading.Thread(...))
threads.append(threading.Thread(...))
threads.append(threading.Thread(...))
for thread in threads:
thread.start()
# now all threads are running, some might already be done
for thread in threads:
thread.join()
# here all threads are done
Christian
--
http://mail.python.org/mailman/listinfo/python-list