8000 extmod/uasyncio: fix gather cancellation and handling of exceptions by dpgeorge · Pull Request #8459 · micropython/micropython · GitHub
[go: up one dir, main page]

Skip to content

extmod/uasyncio: fix gather cancellation and handling of exceptions #8459

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

Merged
merged 2 commits into from
Mar 30, 2022

Conversation

dpgeorge
Copy link
Member

The following fixes are made to asyncio.gather():

  • cancelling a gather now cancels all sub-tasks of the gather (previously it would only cancel the first)
  • if any sub-task of a gather raises an exception then the gather finishes (previously it would only finish if the first sub-task raised)

Fixes issues #5798, #7807, #7901.

@dpgeorge dpgeorge added the extmod Relates to extmod/ directory in source label Mar 29, 2022
@dpgeorge dpgeorge force-pushed the extmod-uasyncio-improve-gather branch from 07fbcf6 to e9eba8f Compare March 29, 2022 10:41
This implements a form of CPython's "add_done_callback()", but at this
stage it is a hidden feature and only intended to be used internally.

Signed-off-by: Damien George <damien@micropython.org>
The following fixes are made:
- cancelling a gather now cancels all sub-tasks of the gather (previously
  it would only cancel the first)
- if any sub-task of a gather raises an exception then the gather finishes
  (previously it would only finish if the first sub-task raised)

Fixes issues micropython#5798, micropython#7807, micropython#7901.

Signed-off-by: Damien George <damien@micropython.org>
@dpgeorge dpgeorge force-pushed the extmod-uasyncio-improve-gather branch from e9eba8f to 90aaf2d Compare March 30, 2022 05:08
@dpgeorge dpgeorge merged commit 90aaf2d into micropython:master Mar 30, 2022
@dpgeorge dpgeorge deleted the extmod-uasyncio-improve-gather branch March 30, 2022 05:28
tannewt added a commit to tannewt/circuitpython that referenced this pull request Oct 20, 2023
Update Metro S3 pin mapping for Rev B
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extmod Relates to extmod/ directory in source
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0