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 df3f2e5cf62..d71cdeb25fd 100644 --- a/src/libstd/sync/condvar.rs +++ b/src/libstd/sync/condvar.rs @@ -281,8 +281,8 @@ impl StaticCondvar { mod tests { use prelude::v1::*; - use comm::channel; use super::{StaticCondvar, CONDVAR_INIT}; + use sync::mpsc::channel; use sync::{StaticMutex, MUTEX_INIT, Condvar, Mutex, Arc}; use thread::Thread; use time::Duration; @@ -331,25 +331,25 @@ mod tests { let mut cnt = lock.lock().unwrap(); *cnt += 1; if *cnt == N { - tx.send(()); + tx.send(()).unwrap(); } while *cnt != 0 { cnt = cond.wait(cnt).unwrap(); } - tx.send(()); + tx.send(()).unwrap(); }).detach(); } drop(tx); let &(ref lock, ref cond) = &*data; - rx.recv(); + rx.recv().unwrap(); let mut cnt = lock.lock().unwrap(); *cnt = 0; cond.notify_all(); drop(cnt); for _ in range(0, N) { - rx.recv(); + rx.recv().unwrap(); } } |
