Threading module question

Aahz aahz at pythoncraft.com
Thu Jul 22 10:20:35 EDT 2004


In article <2830c89c.0407150251.5d557214 at posting.google.com>,
Andrew Gregory <andrew.gregory at npl.co.uk> wrote:
>
>Solution: You cannot re-run a threaded function, but you can delete
>the thread a create a new one. I'm sure that I should have thought of
>that before, but this is the first occasion that I've tried to use use
>threads, and this was not obvious to me from the docs. I've posted the
>code in case it's useful to others.

Better answer: re-use the thread.  Have the thread you create sitting on
a Queue, waiting for input.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

Barbara Boxer speaks for me:
http://buffaloreport.com/2004/040713.boxer.marriage.html



More information about the Python-list mailing list