We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 62d6ba4 + ba6a6d0 commit 3672cafCopy full SHA for 3672caf
src/libstd/sync/condvar.rs
@@ -47,11 +47,13 @@ impl WaitTimeoutResult {
47
///
48
/// thread::spawn(move|| {
49
/// let &(ref lock, ref cvar) = &*pair2;
50
+ ///
51
+ /// // Let's wait 20 milliseconds before notifying the condvar.
52
+ /// thread::sleep(Duration::from_millis(20));
53
54
/// let mut started = lock.lock().unwrap();
55
/// // We update the boolean value.
56
/// *started = true;
- /// // Let's wait 20 milliseconds before notifying the condvar.
- /// thread::sleep(Duration::from_millis(20));
57
/// cvar.notify_one();
58
/// });
59
0 commit comments