Message297241
In terms of general design cleanliness, I think it would be better to make `interrupt_main` work reliably than to have IDLE add workarounds for its unreliability.
AFAICT the ideal, minimal redundancy solution would be:
- interrupt_main just calls raise(SIGINT)
- bpo-21895 is fixed by adding a few lines to Python's C-level signal handler on Unix-likes to check if it's running in the main thread, and if not then use pthread_kill to redirect the signal to the main thread.
If trying to fix bpo-28195 is too controversial, then a minimal change would be:
- in interrupt_main, if we're on Windows, call raise(SIGINT); otherwise, call pthread_kill(main_thread, SIGINT)
And in either case we'd also have to document that interrupt_main is now equivalent to the user having hit control-C. But AFAICT that's what all its users really want anyway. |
|
Date |
User |
Action |
Args |
2017-06-28 23:24:31 | njs | set | recipients:
+ njs, terry.reedy, martin.panter, Mark, eryksun, louielu |
2017-06-28 23:24:31 | njs | set | messageid: <1498692271.95.0.794629818926.issue29926@psf.upfronthosting.co.za> |
2017-06-28 23:24:31 | njs | link | issue29926 messages |
2017-06-28 23:24:31 | njs | create | |
|