[Python-ideas] Thread stopping

Antoine Pitrou solipsis at pitrou.net
Sat Mar 31 20:32:42 CEST 2012

On Fri, 30 Mar 2012 10:31:26 -0700 (PDT)
Miki Tebeka <miki.tebeka at gmail.com> wrote:
> > I propose to add Thread.interrupt() function.
> Does the new 
> http://docs.python.org/dev/library/signal.html#signal.pthread_kill help in 
> any way?

Not in any way, no, because Python only executes its own signal
handlers in the main thread, even when the signal was received in
another thread.

Therefore, with interpreter threads, pthread_kill()'s only point is to
make a running system call return with EINTR.



More information about the Python-ideas mailing list