[issue29988] (async) with blocks and try/finally are not as KeyboardInterrupt-safe as one might like

Nick Coghlan report at bugs.python.org
Mon Sep 4 18:48:10 EDT 2017


Nick Coghlan added the comment:

Right, if you look at the comments in the draft test case, we realised there are three things we currently need to protect:

1. POP_BLOCK -> WITH_CLEANUP_START (synchronous CM)
2. POP_BLOCK -> GET_AWAITABLE (asynchronous CM)
3. GET_AWAITABLE -> YIELD_FROM (asynchronous CM)

Now that I have a test case, I'm going to start looking at defining a new DEFER_PENDING_UNTIL opcode that skips pending call processing (and hence signals) until that particular opcode offset is reached.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29988>
_______________________________________


More information about the Python-bugs-list mailing list