On Tue, Nov 28, 2017 at 11:54 AM, Marko Rauhamaa <ma...@pacujo.net> wrote:
> Chris Angelico <ros...@gmail.com>:
>> Would the OP have been trivially able to send a signal to the
>> process? Yes.
>
>    Python signal handlers are always executed in the main Python thread,
>    even if the signal was received in another thread. This means that
>    signals can’t be used as a means of inter-thread communication.
>
>    <URL: https://docs.python.org/3/library/signal.html#signals-and-threads>

Being received in the other thread, it would still interrupt the
system call however, wouldn't it? Quoting from the doc:

"However, if the target thread is executing the Python interpreter,
the Python signal handlers will be executed by the main thread.
Therefore, the only point of sending a signal to a particular Python
thread would be to force a running system call to fail with
InterruptedError."
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to