This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients Mark.Shannon, deleted0524, erik.bray, gregory.p.smith, jdemeyer, ncoghlan, njs, serhiy.storchaka, xgdomingo, yselivanov
Date 2018-07-09.13:47:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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, 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:29ncoghlansetrecipients: + ncoghlan, gregory.p.smith, njs, Mark.Shannon, erik.bray, serhiy.storchaka, jdemeyer, yselivanov, deleted0524, xgdomingo
2018-07-09 13:47:28ncoghlansetmessageid: <>
2018-07-09 13:47:28ncoghlanlinkissue29988 messages
2018-07-09 13:47:28ncoghlancreate