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

watch::Receiver::wait_for(): Prevent poisoning of the lock #6021

Merged
merged 2 commits into from
Sep 24, 2023

Conversation

uklotzde
Copy link
Contributor

Motivation

If the provided closure panics the lock is poisoned.

Solution

Adopt the catch_unwind() strategy that is already used elsewhere.

@uklotzde uklotzde changed the title Sync watch receiver wait for watch::Receiver::wait_for(): Prevent poisoning of the lock Sep 21, 2023
@github-actions github-actions bot added the R-loom-sync Run loom sync tests on this PR label Sep 21, 2023
@Darksonn Darksonn added A-tokio Area: The main tokio crate M-sync Module: tokio/sync labels Sep 21, 2023
Copy link
Contributor

@Darksonn Darksonn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@Darksonn Darksonn merged commit e76c06b into tokio-rs:master Sep 24, 2023
73 of 77 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate M-sync Module: tokio/sync R-loom-sync Run loom sync tests on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants