diff options
Diffstat (limited to 'src/libstd/sync/condvar.rs')
| -rw-r--r-- | src/libstd/sync/condvar.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libstd/sync/condvar.rs b/src/libstd/sync/condvar.rs index 0fdd57b2792..3bdab261e19 100644 --- a/src/libstd/sync/condvar.rs +++ b/src/libstd/sync/condvar.rs @@ -41,7 +41,7 @@ use time::Duration; /// let pair2 = pair.clone(); /// /// // Inside of our lock, spawn a new thread, and then wait for it to start -/// spawn(proc() { +/// spawn(move|| { /// let &(ref lock, ref cvar) = &*pair2; /// let mut started = lock.lock(); /// *started = true; @@ -282,7 +282,7 @@ mod tests { static M: StaticMutex = MUTEX_INIT; let g = M.lock(); - spawn(proc() { + spawn(move|| { let _g = M.lock(); C.notify_one(); }); @@ -300,7 +300,7 @@ mod tests { for _ in range(0, N) { let data = data.clone(); let tx = tx.clone(); - spawn(proc() { + spawn(move|| { let &(ref lock, ref cond) = &*data; let mut cnt = lock.lock(); *cnt += 1; @@ -334,7 +334,7 @@ mod tests { let g = M.lock(); assert!(!C.wait_timeout(&g, Duration::nanoseconds(1000))); - spawn(proc() { + spawn(move|| { let _g = M.lock(); C.notify_one(); }); @@ -351,7 +351,7 @@ mod tests { static C: StaticCondvar = CONDVAR_INIT; let g = M1.lock(); - spawn(proc() { + spawn(move|| { let _g = M1.lock(); C.notify_one(); }); |
