-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Adjust doc comment of Condvar::wait_while #129614
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @tgross35 (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
Proposing this change, since a colleague interpreted the docs as I first did; This function should only be called after first checking condition myself, since it will wait for a notification. I suspected that interpretation to be wrong however; I've hardly ever seen condvar:s waited upon before an initial condition-check, so this interpretation sounded surprising. Checking the source confirmed my suspicion. I'm not at all wed to my proposed phrasing, feel free to look for better ways to express it. |
This comment has been minimized.
This comment has been minimized.
Thanks for the updates here! The docs for |
64eb061
to
f01a8fc
Compare
The existing phrasing implies that a notification must be received for `wait_while` to return. The phrasing is changed to better reflect the behavior.
Sorry this took so many iterations for a pretty minimal fix, but thanks for taking care of the updates! @bors r+ rollup |
…mpiler-errors Rollup of 9 pull requests Successful merges: - rust-lang#128871 (bypass linker configuration and cross target check for specific commands) - rust-lang#129468 ([testsuite][cleanup] Remove all usages of `dont_merge` hack to avoid function merging) - rust-lang#129614 (Adjust doc comment of Condvar::wait_while) - rust-lang#129840 (Implement suggestions for `elided_named_lifetimes`) - rust-lang#129891 (Do not request sanitizers for naked functions) - rust-lang#129899 (Add Suggestions for Misspelled Keywords) - rust-lang#129940 (s390x: Fix a regression related to backchain feature) - rust-lang#129987 (Don't store region in `CapturedPlace`) - rust-lang#130054 (Add missing quotation marks) r? `@ghost` `@rustbot` modify labels: rollup
…mpiler-errors Rollup of 9 pull requests Successful merges: - rust-lang#128871 (bypass linker configuration and cross target check for specific commands) - rust-lang#129468 ([testsuite][cleanup] Remove all usages of `dont_merge` hack to avoid function merging) - rust-lang#129614 (Adjust doc comment of Condvar::wait_while) - rust-lang#129840 (Implement suggestions for `elided_named_lifetimes`) - rust-lang#129891 (Do not request sanitizers for naked functions) - rust-lang#129899 (Add Suggestions for Misspelled Keywords) - rust-lang#129940 (s390x: Fix a regression related to backchain feature) - rust-lang#129987 (Don't store region in `CapturedPlace`) - rust-lang#130054 (Add missing quotation marks) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#129614 - rawler:patch-1, r=tgross35 Adjust doc comment of Condvar::wait_while The existing phrasing implies that a notification must be received for `wait_while` to return. The phrasing is changed to make no such implication.
The existing phrasing implies that a notification must be received for
wait_while
to return. The phrasing is changed to make no such implication.