Threads
Itamar Shtull-Trauring
itamar at itamarst.org_NOSPAM
Thu Aug 29 23:35:37 EDT 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 http://itamarst.org/
Available for Python, Twisted, Zope and Java consulting
More information about the Python-list
mailing list