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

mpsc: use spin_loop_hint instead of yield_now #4115

Merged
merged 1 commit into from
Sep 18, 2021
Merged

Conversation

Darksonn
Copy link
Contributor

The mpsc channel has a bunch of calls to yield_now that should be spin_loop_hint. However they should remain as calls to yield_now when testing with loom. This PR expands the crate::loom mock to handle this.

Related: #4037

@Darksonn Darksonn added A-tokio Area: The main tokio crate M-sync Module: tokio/sync labels Sep 17, 2021
@Darksonn Darksonn merged commit f1b8967 into master Sep 18, 2021
@Darksonn Darksonn deleted the mpsc_yield_now branch September 18, 2021 07:27
@Darksonn Darksonn mentioned this pull request Sep 21, 2021
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants