[issue46771] Add some form of cancel scopes

Alex Grönholm report at bugs.python.org
Fri Feb 18 05:57:37 EST 2022


Alex Grönholm <alex.gronholm at nextday.fi> added the comment:

I am also uncomfortable using the cancel message to deliver the token/nonce/whatever.

If TaskGroup.cancel() is implemented, would it also deliver a cancellation in the parent task like trio and AnyIO do? It should IMHO, because otherwise if the task group is cancelled, it could still get stuck waiting on whatever the parent task happens to be waiting on, if it's not at TaskGroup.__aexit__() yet.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46771>
_______________________________________


More information about the Python-bugs-list mailing list