Skip to content

Conversation

@methane
Copy link
Member

@methane methane commented May 11, 2017

when there are no more await or yield (from) before return in coroutine,
cancel was ignored.

example:

async def coro():
    asyncio.Task.current_task().cancel()
    return 42
...
res = await coro()  # should raise CancelledError

(cherry picked from commit 991adca)
(original: GH-1097)

when there are no more `await` or `yield (from)` before return in coroutine,
cancel was ignored.

example:

    async def coro():
        asyncio.Task.current_task().cancel()
        return 42
    ...
    res = await coro()  # should raise CancelledError
(cherry picked from commit 991adca)
@methane methane changed the title bpo-30048: asyncio: fix Task.cancel() was ignored. [3.5] bpo-30048: asyncio: fix Task.cancel() was ignored. May 11, 2017
@methane methane merged commit 5e94ded into python:3.5 May 12, 2017
@methane methane deleted the py35-30048 branch May 12, 2017 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants