threads only called once?
Gerson Kurz
moc.q-dnan-p at p-nand-q.com
Wed Aug 7 02:36:26 EDT 2002
On Tue, 06 Aug 2002 13:51:00 GMT, "Ian McMeans" <imcmeans at telus.net>
wrote:
>Why can't the thread be started again if it's not alive (ie not running)? Am
>I missing something here?
I run into that, too, and I felt its pretty stupid. (Why! this
limitation. It can't be just because the documentation says "at most
once", it has to have a technical reason). I'm using something like
the following now always:
>>> import threading
>>> class test(threading.Thread):
... def run(self):
... print "run called"
...
>>> t = test()
>>> threading.Thread( target = t.run ).start()
run called
>>> threading.Thread( target = t.run ).start()
run called
>>> threading.Thread( target = t.run ).start()
run called
>>> ...
More information about the Python-list
mailing list