[Python-Dev] Signals, threads, blocking C functions
"Martin v. Löwis"
martin at v.loewis.de
Wed Sep 13 05:36:34 CEST 2006
Nick Maclaren schrieb:
>> (coment by Arjan van de Ven):
>> | afaik the kernel only sends signals to threads that don't have them blocked.
>> | If python doesn't want anyone but the main thread to get signals, it
>> should just
>> | block signals on all but the main thread and then by nature, all
>> signals will go
>> | to the main thread....
>
> Well, THAT'S wrong, I am afraid! Things ain't that simple :-(
>
> Yes, POSIX implies that things work that way, but there are so many
> get-out clauses and problems with trying to implement that specification
> that such behaviour can't be relied on.
Can you please give one example for each (one get-out clause, and
one problem with trying to implement that).
I fail to see why it isn't desirable to make all signals occur
in the main thread, on systems where this is possible.
Regards,
Martin
More information about the Python-Dev
mailing list