Skip to content

Commit

Permalink
Adjust doc comment of Condvar::wait_while
Browse files Browse the repository at this point in the history
The existing phrasing implies that a notification must be received for `wait_while` to return. The phrasing is changed to make no such implication.
  • Loading branch information
rawler authored Aug 26, 2024
1 parent 22572d0 commit eb5a0d9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions library/std/src/sync/condvar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,10 @@ impl Condvar {
if poisoned { Err(PoisonError::new(guard)) } else { Ok(guard) }
}

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

0 comments on commit eb5a0d9

Please sign in to comment.