stopping a thread with _Thread__stop

Eli Bendersky eliben at gmail.com
Fri Aug 5 08:16:37 EDT 2011


This recipe: http://code.activestate.com/recipes/576780-timeout-for-nearly-any-callable/

Claims that a Python thread can be stopped by executing the private
method "Thread._Thread__stop". I don't think this is true, since
_Thread__stop doesn't really stop or kill the thread. In conformance
to theory, the "timelimited" method this recipe defines leaves a
thread running in the background if the function it's given is
long-running (or infinite). Is there something I'm missing?

Eli



More information about the Python-list mailing list