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

sync: fix sync::broadcast::Sender<T>::closed() doctest #7090

Merged
merged 1 commit into from
Jan 12, 2025

Conversation

evanrittenhouse
Copy link
Contributor

The test's previous iteration could sometimes flake since we didn't await the completion of the first task. Since the tasks only existed to move the relevant rx's in, to force a drop, we can omit them entirely and drop the rxs via drop(). This prevents any scheduling-related flakes.

Motivation

Solution

The test's previous iteration could sometimes flake since we didn't
await the completion of the first task. Since the tasks only existed to
`move` the relevant `rx`'s in, to force a drop, we can omit them
entirely and drop the `rx`s via `drop()`. This prevents any
scheduling-related flakes.
@github-actions github-actions bot added the R-loom-sync Run loom sync tests on this PR label Jan 11, 2025
@Darksonn Darksonn added A-tokio Area: The main tokio crate M-sync Module: tokio/sync labels Jan 12, 2025
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.

Thank you.

@Darksonn Darksonn merged commit 435e390 into tokio-rs:master Jan 12, 2025
92 of 94 checks passed
@evanrittenhouse evanrittenhouse deleted the evanrittenhouse/7087 branch January 12, 2025 14:02
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