Itamar Shtull-Trauring itamar at itamarst.org_NOSPAM
Fri Aug 30 05:35:37 CEST 2002

Shashank Date wrote:

> Each thread will go out on the web (various web sites) and fetch certain
> documents. The main thread will wait for all the threads to terminate OR
> some external event (like deletion of a file). If the external event fires
> before termination of child-threads it kills all the spawned threads and
> terminates.

Use Queue.Queue objects to pass tasks to threads (or, say, None to tell a
thread to shutdown.) You can't really kill threads in Python, they can only
exit on their own.

Itamar Shtull-Trauring
Available for Python, Twisted, Zope and Java consulting

More information about the Python-list mailing list