How to force a thread to stop
Paul Rubin
http
Tue Jul 25 08:51:47 EDT 2006
bryanjugglercryptographer at yahoo.com writes:
> Threadicide would not solve the problems you actually have, and it
> tends to create other problems. What is the condition that makes
> you want to kill the thread? Make the victim thread respond to that
> condition itself.
If the condition is a timeout, one way to notice it is with sigalarm,
which raises an exception in the main thread. But then you need a way
to make something happen in the remote thread.
More information about the Python-list
mailing list