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

coop: fix flaky coop test #5074

Merged
merged 1 commit into from
Oct 5, 2022
Merged

coop: fix flaky coop test #5074

merged 1 commit into from
Oct 5, 2022

Conversation

Darksonn
Copy link
Contributor

@Darksonn Darksonn commented Oct 4, 2022

This test sometimes fails if the tasks aren't completed within 100ms. This test uses an unbounded mpsc channel instead of 1000 tasks. This works because mpsc also hooks into the coop system, and it eliminates the race.

@Darksonn Darksonn added A-tokio Area: The main tokio crate M-coop Module: tokio/coop labels Oct 4, 2022
Copy link
Contributor

@hds hds left a comment

Choose a reason for hiding this comment

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

Nice solution. I learnt something today.

@Darksonn Darksonn merged commit fdc28bc into master Oct 5, 2022
@Darksonn Darksonn deleted the alice/fix-flaky-coop-test branch October 5, 2022 10:55
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-coop Module: tokio/coop
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants