[issue30048] If a task is canceled at the right moment, the cancellation is ignored

INADA Naoki report at bugs.python.org
Wed Apr 12 21:07:37 EDT 2017


INADA Naoki added the comment:

> In Evgeny's example the 'task' is 'coro1' (not 'coro2'). It has plenty of yield points after being cancelled.

Since coro1 waiting coro2 when cancelling, Task(coro1).cancel() redirect to Task(coro2).cancel().

But I was wrong about "CancelledError is thrown to coro2."
Task(coro2) is cancelled in last step.  CancelledError is not thrown to coro2 actually.
So there is chance to detect it.

----------

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


More information about the Python-bugs-list mailing list