How can I kill a running thread when exiting from __main__
Steve Holden
steve at holdenweb.com
Tue Apr 3 13:50:18 EDT 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.
>
> Skip
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
starting it?
Maybe, then, the real answer is "just exit from the main thread"?
regards
Steve
--
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
mailing list