How to kill a thread?
john.dohn.john at gmail.com
Fri Jun 6 14:22:38 CEST 2008
On Fri, Jun 6, 2008 at 10:30 PM, John Dohn <john.dohn.john at gmail.com> wrote:
> Hi there,
> How can I kill a threading.Thread subclass from MainThread?
At the end I did:
# Thread exiting
data = q_in.get(timeout = .5)
# ... process data
And then in the MainThread I do exit_event.set() and wait for all threads to
exit. It's a pretty awkward solution but works.
BTW Guys, is something like Thread.kill() planned for the future? Or is
there a reason not to have it?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list