Skip to content

[3.x] Consistent cancellation semantics for coroutine() - #54

Merged
WyriHaximus merged 1 commit into
reactphp:3.xfrom
clue-labs:cancellation-v3
Jun 30, 2022
Merged

[3.x] Consistent cancellation semantics for coroutine()#54
WyriHaximus merged 1 commit into
reactphp:3.xfrom
clue-labs:cancellation-v3

Conversation

@clue

@clueclue commented Jun 29, 2022

Copy link
Copy Markdown
Member

This changeset ensures we're using consistent cancellation semantics for 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 coroutine and another operation is started or if the pending operation does not support cancellation, the coroutine may continue executing.

Refs #42
Builds on top of #12, #13 and #47

@clueclue added new feature New feature or request BC break labels Jun 29, 2022
@clueclue added this to the v3.0.0 milestone Jun 29, 2022
@clue
clue requested a review from WyriHaximusJune 29, 2022 11:46
@WyriHaximus
WyriHaximus merged commit 5bc3782 into reactphp:3.xJun 30, 2022
@clue
clue deleted the cancellation-v3 branch June 30, 2022 09:03
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BC breaknew featureNew feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@clue@WyriHaximus