Message321318
While Greg Smith and I both cringed at the idea when I first raised it, I'm becoming more and more convinced that the only way we're going to be able to make resource cleanup reliable is for with statements to have the ability to disable signal handling while __enter__ and __exit__ methods are running.
When a with statement switches signal handling off in a particular execution context, there'd then need to be some absolute timing deadline for switching them back on, so resource acquisition or cleanup that got stuck in an infinite loop could still be interrupted eventually.
If you combined that with the signal handling approach in https://github.com/ncoghlan/cpython/pull/2/files, then I think we'd have as solid a solution as CPython is likely to be able to provide. |
|
Date |
User |
Action |
Args |
2018-07-09 13:47:29 | ncoghlan | set | recipients:
+ ncoghlan, gregory.p.smith, njs, Mark.Shannon, erik.bray, serhiy.storchaka, jdemeyer, yselivanov, deleted0524, xgdomingo |
2018-07-09 13:47:28 | ncoghlan | set | messageid: <1531144048.95.0.56676864532.issue29988@psf.upfronthosting.co.za> |
2018-07-09 13:47:28 | ncoghlan | link | issue29988 messages |
2018-07-09 13:47:28 | ncoghlan | create | |
|