You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bpo-46752: Introduce task groups to asyncio and change task cancellation semantics
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2022-03-30.21:21:54.459>created_at=<Date2018-02-02.23:29:02.585>labels= ['3.8', 'expert-asyncio']
title='feature request: asyncio.gather/wait cancel children on first exception'updated_at=<Date2022-03-30.21:21:54.459>user='https://github.com/thehesiod'
currently gather/wait allow you to return on the first exception and leave the children executing.
A very common use case that I have is of launching multiple tasks, and if any of them fail, then all should fail..otherwise the other tasks would continue running w/o anyone listening for the results. To accomplish this I wrote a method like the following: https://gist.github.com/thehesiod/524a1f005d0f3fb61a8952f272d8709e. I think it would be useful to many others as on optional perhaps a parameter to each of these methods.
I think it's a good idea and I wanted to implement it by copying TaskGroups from curio in 3.7. But then I saw Trio's nurseries and I have a few ideas about slightly different design inspired by both curio and Trio :)
I have some very WIP code that I plan to finish in a few weeks. I'll update this issue then.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: