Is it possible to kill a thread ?
jason petrone
jp at NOSPAMdemonseed.net
Fri Dec 7 13:57:16 EST 2001
Grant Edwards <grante at visi.com> wrote:
> The problem with this is that one often creates a thread so
> that it can do some possibly blocking operation without
> stopping the rest of the program. If the thread is blocked, it
> can't check the event.
I actually submitted a thread.kill patch, but the Pythoneers managed to
convince me that the only clean way to do it is to throw an exception in the
blocked code. Easy enough to do with posix threads, but a massive pain on
less robust platforms(*ahem* win32).
Now I just use non-blocking IO. Its a little more work, but I can do
everything I need.
jason
More information about the Python-list
mailing list