How can I kill a running thread when exiting from __main__
steve at holdenweb.com
Tue Apr 3 19:50:18 CEST 2007
skip at pobox.com wrote:
> Steve> The only way to do this is to have the thread regularly examine a
> Steve> "please quit" flag that is set from the main thread when
> Steve> termination is required.
> I thought the process would terminate when only daemon threads were left.
So it does - according to the documentation. In which case why is the OP
asking the question, since his code sets the queuethread daemonic before
Maybe, then, the real answer is "just exit from the main thread"?
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
Recent Ramblings http://holdenweb.blogspot.com
More information about the Python-list