Author ncoghlan
Recipients Mark.Shannon, deleted0524, erik.bray, gregory.p.smith, jdemeyer, ncoghlan, njs, xgdomingo, yselivanov
Date 2017-09-05.19:08:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1504638481.89.0.300113003839.issue29988@psf.upfronthosting.co.za>
In-reply-to
Content
https://github.com/ncoghlan/cpython/pull/2/files now adds a DEFER_PENDING_UNTIL opcode that relies on the jump offset calculation machinery to decide how long pending call processing should be deferred.

Right now, the test case is also emulating the "skip pending call" logic based on a frame attribute, but I'm going to try to replace that with a suitable call to _testcapi._pending_threadfunc, which would avoid the need to expose those details on the frame, and ensure that we're testing the logic that actually matters.

However, the good news is that:

1. the patch is complete enough that I think it demonstrates that this approach is potentially viable
2. because it only suspends pending call process in the *current* frame, it's safe to cross boundaries that may call arbitrary Python code (this turns out to be important for the async with case)
History
Date User Action Args
2017-09-05 19:08:01ncoghlansetrecipients: + ncoghlan, gregory.p.smith, njs, Mark.Shannon, erik.bray, jdemeyer, yselivanov, deleted0524, xgdomingo
2017-09-05 19:08:01ncoghlansetmessageid: <1504638481.89.0.300113003839.issue29988@psf.upfronthosting.co.za>
2017-09-05 19:08:01ncoghlanlinkissue29988 messages
2017-09-05 19:08:01ncoghlancreate