This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Implement cancellation support/protection for module callbacks#12469
Closed
squahtx wants to merge 3 commits intosquah/delay_cancellation_for_awaitablesfrom
Closed
Implement cancellation support/protection for module callbacks#12469squahtx wants to merge 3 commits intosquah/delay_cancellation_for_awaitablesfrom
squahtx wants to merge 3 commits intosquah/delay_cancellation_for_awaitablesfrom
Conversation
835105e to
c2fb882
Compare
beab661 to
1a43a50
Compare
added 3 commits
April 13, 2022 20:08
Update module callbacks with read semantics to not suppress `CancelledError`s. Module callbacks with write semantics have been left alone, since we don't expect cancellation to work correctly for those code paths. Signed-off-by: Sean Quah <seanq@element.io>
The `on_*` callbacks have been left alone, since they are presumed to be run on code paths that aren't cancellation-friendly. Signed-off-by: Sean Quah <seanq@element.io>
c2fb882 to
53bc43c
Compare
1a43a50 to
84a47e3
Compare
Contributor
Author
|
Going to close this for now. A bunch of tests need updating first to not use the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update module callbacks with read semantics to protect them against
cancellation and avoid swallowing
CancelledErrors.Other module callbacks, such as the
on_*callbacks, are presumed tolive on code paths that involve writes and aren't cancellation-friendly.
These module callbacks have been left alone.
Includes changes from #12468.
Pull Request Checklist
EventStoretoEventWorkerStore.".code blocks.(run the linters)