diff options
author | Elvis Pranskevichus <elvis@magic.io> | 2018-10-03 15:28:44 (GMT) |
---|---|---|
committer | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-10-03 15:28:44 (GMT) |
commit | 166773df0ce6c852130f524029fa2e62b37b89cb (patch) | |
tree | 7b8928090dcd7dfc06e21cb51728e19a72a50ee3 /Lib/enum.py | |
parent | 6580e52b64cb207f03a1bf86a18f088b081c10f4 (diff) | |
download | cpython-166773df0ce6c852130f524029fa2e62b37b89cb.zip cpython-166773df0ce6c852130f524029fa2e62b37b89cb.tar.gz cpython-166773df0ce6c852130f524029fa2e62b37b89cb.tar.bz2 |
[3.6] bpo-34872: Fix self-cancellation in C implementation of asyncio.Task (GH-9679) (GH-9690)
The C implementation of asyncio.Task currently fails to perform the
cancellation cleanup correctly in the following scenario.
async def task1():
async def task2():
await task3 # task3 is never cancelled
asyncio.current_task().cancel()
await asyncio.create_task(task2())
The actuall error is a hardcoded call to `future_cancel()` instead of
calling the `cancel()` method of a future-like object.
Thanks to Vladimir Matveev for noticing the code discrepancy and to
Yury Selivanov for coming up with a pathological scenario.
(cherry picked from commit 548ce9dedd2e90945970671d441436a6a91608ab)
https://bugs.python.org/issue34872
Diffstat (limited to 'Lib/enum.py')
0 files changed, 0 insertions, 0 deletions