Skip to content

Commit eb5a0d9

Browse files
authored
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.
1 parent 22572d0 commit eb5a0d9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

library/std/src/sync/condvar.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,10 @@ impl Condvar {
195195
if poisoned { Err(PoisonError::new(guard)) } else { Ok(guard) }
196196
}
197197

198-
/// Blocks the current thread until this condition variable receives a
199-
/// notification and the provided condition is false.
198+
/// Blocks the current thread until the provided `condition` is met.
199+
///
200+
/// While `condition` is not met, this function will [`wait`] for
201+
/// notification, before again checking `condition`.
200202
///
201203
/// This function will atomically unlock the mutex specified (represented by
202204
/// `guard`) and block the current thread. This means that any calls

0 commit comments

Comments
 (0)