Message133960
> I don't think so, please re-read.
Oh, I thought that Py_AddPendingCall() was used to store the pending signal. But no, it asks Python main loop to check which signal has been trigerred, and we can only do it once for all signals.
Attached patch should fix this issue:
- signal_handler() and PyErr_SetInterrupt() only call Py_AddPendingCall() on the first signal (if is_tripped is zero): it should fix the deadlock and it is a micro optimization (win-win !)
- PyErr_SetInterrupt() uses the wake up API (write "\0" into wakeup_fd, API introduced by issue #1583)
- Remove debug code in test_threadsignals
Python 2.7 (and 2.6?) should also be patched: signal.set_wakeup_fd() and PySignal_SetWakeupFd() were introduced in 2.6, but there is no versionadded tag => signal_versionadded.patch |
|
Date |
User |
Action |
Args |
2011-04-18 10:40:31 | vstinner | set | recipients:
+ vstinner, pitrou, python-dev |
2011-04-18 10:40:31 | vstinner | set | messageid: <1303123231.01.0.0893225357862.issue11768@psf.upfronthosting.co.za> |
2011-04-18 10:40:30 | vstinner | link | issue11768 messages |
2011-04-18 10:40:30 | vstinner | create | |
|