We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16362c7 commit ba6a6d0Copy full SHA for ba6a6d0
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