Lets Talk More Threads
Alex McHale
daimun at home.com
Thu Oct 19 09:59:30 EDT 2000
Ok,
Using the Thread class, which I'm extremely happy with, I've run into a
problem. The documentation on the class suggests that you can obj.start( )
a thread multiple times. Yet, when I do this, I get an error to the effect
of "thread already started"
What I'm needing to do is have a thread which I can resurrect over and over.
This isn't the code I'm dealing with, but it is a simple parallel (abstract,
no imports, etc)
actions = myThread( )
actions.start( )
while actions.isAlive( ):
sleep(10)
if not actions.isAlive( ): # this is only to emphasize that
ctions.run( ) has indeed finished
actions.start( )
and this gives the above style error, every time. Am I missing something
here?
More information about the Python-list
mailing list