about summary refs log tree commit diff
path: root/src/libstd/sync
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-02-17 14:31:32 +0000
committerbors <bors@rust-lang.org>2018-02-17 14:31:32 +0000
commitf6216b2d556afba2fdab906409582cb5471eafe0 (patch)
treee7e19978566964b0def4552fdcb0e8f454b48d69 /src/libstd/sync
parentb298607864b76ea6b7b7a4b8bb482472f1604c8d (diff)
parent47db61a3c39da4066cb0b5fa83ddb36e649df7f5 (diff)
downloadrust-f6216b2d556afba2fdab906409582cb5471eafe0.tar.gz
rust-f6216b2d556afba2fdab906409582cb5471eafe0.zip
Auto merge of #48294 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 8 pull requests

- Successful merges: #48095, #48152, #48234, #48239, #48243, #48260, #48284, #48286
- Failed merges:
Diffstat (limited to 'src/libstd/sync')
-rw-r--r--src/libstd/sync/condvar.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libstd/sync/condvar.rs b/src/libstd/sync/condvar.rs
index 56402175817..54bb6513650 100644
--- a/src/libstd/sync/condvar.rs
+++ b/src/libstd/sync/condvar.rs
@@ -47,11 +47,13 @@ impl WaitTimeoutResult {
     ///
     /// thread::spawn(move|| {
     ///     let &(ref lock, ref cvar) = &*pair2;
+    ///
+    ///     // Let's wait 20 milliseconds before notifying the condvar.
+    ///     thread::sleep(Duration::from_millis(20));
+    ///
     ///     let mut started = lock.lock().unwrap();
     ///     // We update the boolean value.
     ///     *started = true;
-    ///     // Let's wait 20 milliseconds before notifying the condvar.
-    ///     thread::sleep(Duration::from_millis(20));
     ///     cvar.notify_one();
     /// });
     ///