-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
[Doc] Explain why thread::yield_now
could be used.
#41982
Conversation
thread::yield_now
could be used.thread::yield_now
could be used.
da17932
to
7a27e26
Compare
r? @rust-lang/docs |
src/libstd/thread/mod.rs
Outdated
/// | ||
/// For example when polling on a resource, it is common to check that it is | ||
/// available, and if not to yield in order to avoid busy waiting. Thus the | ||
/// poll then yield, is a rather common pattern when implementing low-level |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence is a bit confusing. "the poll then yield" for example is a bit hard to understand with just one reading. Don't hesitate to make the sentence longer if it helps the reader to understand more easily.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done :)
7a27e26
to
a9cb094
Compare
Thanks! @bors: r+ rollup |
📌 Commit a9cb094 has been approved by |
[Doc] Explain why `thread::yield_now` could be used. Part of #29378. r? @steveklabnik
💔 Test failed - status-appveyor |
Looks like tests just... hung? Stopped? I can't really tell. Either way, there's practically no way for that to be the fault of this PR. @bors retry |
⌛ Testing commit a9cb094 with merge 4c409dd... |
💔 Test failed - status-appveyor |
@bors retry
|
…umeGomez [Doc] Explain why `thread::yield_now` could be used. Part of rust-lang#29378. r? @steveklabnik
…umeGomez [Doc] Explain why `thread::yield_now` could be used. Part of rust-lang#29378. r? @steveklabnik
…umeGomez [Doc] Explain why `thread::yield_now` could be used. Part of rust-lang#29378. r? @steveklabnik
…umeGomez [Doc] Explain why `thread::yield_now` could be used. Part of rust-lang#29378. r? @steveklabnik
…umeGomez [Doc] Explain why `thread::yield_now` could be used. Part of rust-lang#29378. r? @steveklabnik
…umeGomez [Doc] Explain why `thread::yield_now` could be used. Part of rust-lang#29378. r? @steveklabnik
Part of #29378.
r? @steveklabnik