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

Raise custom SynchronizerShutdown from ongoing calls when synchronizer shuts down #159

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

freider
Copy link
Contributor

@freider freider commented Aug 23, 2024

Allows us to more easily disambiguate user errors that result in asyncio.CancelledError or concurrent.futures.CancelledError from those that are emitted by synchronicity itself when it shuts down.

While this does the job, it might make sense to listen to some event event_loop_shutdown_imminent in our wrapper calls instead (or additionally) and trigger that signal first, to allow further async calls on the event loop for cleanup before the loop actually shuts down. Filing that for a future improvement :)

…loop

In case we are inside the loop we instead propagate asyncio.CancelledErrors
@freider freider requested a review from erikbern August 23, 2024 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant