[Python-Dev] Problem with signals in a single threaded application (original) (raw)

"Martin v. Löwis" martin at v.loewis.de
Sat Jan 27 09:22:48 CET 2007


Greg Ewing schrieb:

Please try to come up with a patch (e.g. by putting a while(istripped) loop around the for loop). That isn't going to fix it.

Why not?

What's needed is to somehow atomically test and clear istripped at the beginning.

How would that help? The case in question was a signal raised inside a signal handler. With my proposed solution, that would be processed in the next while loop; if it is cleared at the beginning, the call will wait for the next CheckSignals invocation.

Also, why does it need to clear is_tripped atomically? If it is only cleared if it is set, I see no need to make the test and the clearing atomic.

Regards, Martin



More information about the Python-Dev mailing list