Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add TaskGroup here or in another library #7

Open
dhalbert opened this issue Nov 24, 2021 · 2 comments
Open

add TaskGroup here or in another library #7

dhalbert opened this issue Nov 24, 2021 · 2 comments

Comments

@dhalbert
Copy link
Contributor

asyncio could really use a TaskGroup implementation, as provided by Trio (aka nurseries), Curio, aiotools, and EdgeDB.

TaskGroup was originally slated to be added Python as long ago as 3.8, but was held up because exception group handling was not available. However, exception groups are now being added: PEP 654, PR). Once that PEP is implemented, TaskGroup will probably follow. But the timeline for PEP 654 to go into the MicroPython core is unclear. So any TaskGroup we add will not be quite compatible, and we probably want to add it in an ancillary library (adafruit_asyncio or asynciox or xasyncio or ??).

@dhalbert
Copy link
Contributor Author

TaskGroups going in to CPython 3.11:
https://bugs.python.org/issue46752
python/cpython#31270

Quattro version (not using multi-except):
https://github.com/Tinche/quattro

@dorinclisu
Copy link

dorinclisu commented Apr 14, 2024

I agree it would be a good idea to support structured concurrency, as going head-on with the older asyncio primitives can get pretty messy.

Maybe the anyio lib could be helpful, as it follows the good ideas of trio but can work with the default asyncio backend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants