Author ncoghlan
Recipients ncoghlan, njs, yselivanov
Date 2017-04-05.05:46:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1491371172.24.0.329203149425.issue29988@psf.upfronthosting.co.za>
In-reply-to
Content
My first thought would be to inject a wordcode instruction that's essentially an eval loop directive: "ATOMIC_UNTIL <offset>"

ATOMIC_UNTIL would have at least the following properties:

- checks for signals are skipped until the given offset is reached
- checks to release the GIL are skipped until the given offset is reached

It may also have the following defensive coding property:

- only wordcode instructions on a pre-approved whitelist are permitted during atomic execution blocks (i.e. we'd only add them to the whitelist on an as needed basis, to minimise the risk of undesirable side effects, like being able to use wordcode manipulation to put an entire loop inside an atomic block)

The last bit would likely have undesirable performance implications, so it would probably be reasonable to only enable the check for debug builds, rather than always enforcing it.
History
Date User Action Args
2017-04-05 05:46:12ncoghlansetrecipients: + ncoghlan, njs, yselivanov
2017-04-05 05:46:12ncoghlansetmessageid: <1491371172.24.0.329203149425.issue29988@psf.upfronthosting.co.za>
2017-04-05 05:46:12ncoghlanlinkissue29988 messages
2017-04-05 05:46:11ncoghlancreate