Message291531
This behavior is documented as:
https://docs.python.org/3.6/library/asyncio-task.html#asyncio.Task.cancel
> Unlike Future.cancel(), this does not guarantee that the task will be cancelled: the exception might be caught and acted upon, delaying cancellation of the task or preventing cancellation completely. The task may also return a value or raise a different exception.
>
> Immediately after this method is called, cancelled() will not return True (unless the task was already cancelled). A task will be marked as cancelled when the wrapped coroutine terminates with a CancelledError exception (even if cancel() was not called).
I agree that this behavior is somewhat surprising.
But I don't know how can I fix the behavior. |
|
Date |
User |
Action |
Args |
2017-04-12 08:46:32 | methane | set | recipients:
+ methane, abacabadabacaba, yselivanov |
2017-04-12 08:46:32 | methane | set | messageid: <1491986792.0.0.939317017155.issue30048@psf.upfronthosting.co.za> |
2017-04-12 08:46:31 | methane | link | issue30048 messages |
2017-04-12 08:46:31 | methane | create | |
|