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

[4.x] Consistent cancellation semantics for async() and coroutine() #55

Merged
merged 2 commits into from
Jun 30, 2022

Conversation

clue
Copy link
Member

@clue clue commented Jun 29, 2022

This changeset ensures we're using consistent cancellation semantics for async() and coroutine(). In particular, calling cancel() on the resulting promise will now try to cancel the first pending operation only. Cancelling a pending operation would usually throw an exception and thus reject the resulting promise. If this exception in caught inside the fiber/coroutine and another operation is started or if the pending operation does not support cancellation, the fiber/coroutine may continue executing.

Refs #42
Changes for coroutine() cherry-picked from #54 for 3.x, but also refs cancellation of async() (see #20 and #34)
Builds on top of #20, #34 and #48

@clue clue added new feature New feature or request BC break labels Jun 29, 2022
@clue clue added this to the v4.0.0 milestone Jun 29, 2022
@clue clue requested a review from WyriHaximus June 29, 2022 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BC break new feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants