If the task's function swallows CancelledError exception -- it is a
programming error.
The same as generator object technically can swallow GeneratorExit
(but such code is most likely buggy).

On Tue, Feb 19, 2019 at 9:55 PM Chris Jerdonek <[email protected]> wrote:
>
> I have an asyncio question.
>
> In Python 3.7, is there a way to reliably end a task after having
> already tried calling cancel() on it and waiting for it to end?
>
> In Python 3.6, I did this with task.set_exception(), but in 3.7 that
> method was removed.
>
> --Chris
> _______________________________________________
> Async-sig mailing list
> [email protected]
> https://mail.python.org/mailman/listinfo/async-sig
> Code of Conduct: https://www.python.org/psf/codeofconduct/



-- 
Thanks,
Andrew Svetlov
_______________________________________________
Async-sig mailing list
[email protected]
https://mail.python.org/mailman/listinfo/async-sig
Code of Conduct: https://www.python.org/psf/codeofconduct/

Reply via email to