Message291157
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. |
|
Date |
User |
Action |
Args |
2017-04-05 05:46:12 | ncoghlan | set | recipients:
+ ncoghlan, njs, yselivanov |
2017-04-05 05:46:12 | ncoghlan | set | messageid: <1491371172.24.0.329203149425.issue29988@psf.upfronthosting.co.za> |
2017-04-05 05:46:12 | ncoghlan | link | issue29988 messages |
2017-04-05 05:46:11 | ncoghlan | create | |
|