Skip to content

add TaskGroup here or in another library #7

Open
@dhalbert

Description

@dhalbert

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 ??).

Activity

dhalbert

dhalbert commented on Feb 16, 2022

@dhalbert
ContributorAuthor

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

dorinclisu commented on Apr 14, 2024

@dorinclisu

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      add TaskGroup here or in another library · Issue #7 · adafruit/Adafruit_CircuitPython_asyncio