diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-12-12 21:38:57 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-12-24 19:59:52 -0800 |
| commit | 018d60509c04cdebdf8b0d9e2b58f2604538e516 (patch) | |
| tree | 00245c6192d883dbc4d45cbb10a314c4e2239d07 /src/libstd/sync/mpsc_queue.rs | |
| parent | d830fcc6eb5173061888d4b128c0670a49515f58 (diff) | |
| download | rust-018d60509c04cdebdf8b0d9e2b58f2604538e516.tar.gz rust-018d60509c04cdebdf8b0d9e2b58f2604538e516.zip | |
std: Get stdtest all passing again
This commit brings the library up-to-date in order to get all tests passing again
Diffstat (limited to 'src/libstd/sync/mpsc_queue.rs')
| -rw-r--r-- | src/libstd/sync/mpsc_queue.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/libstd/sync/mpsc_queue.rs b/src/libstd/sync/mpsc_queue.rs index 89e56e3fa67..a249d6ed2e8 100644 --- a/src/libstd/sync/mpsc_queue.rs +++ b/src/libstd/sync/mpsc_queue.rs @@ -203,8 +203,8 @@ impl<T: Send, P: Send> Consumer<T, P> { mod tests { use prelude::*; - use task; use super::{queue, Data, Empty, Inconsistent}; + use native; #[test] fn test_full() { @@ -222,14 +222,17 @@ mod tests { Empty => {} Inconsistent | Data(..) => fail!() } + let (port, chan) = SharedChan::new(); for _ in range(0, nthreads) { let q = p.clone(); - do task::spawn_sched(task::SingleThreaded) { + let chan = chan.clone(); + do native::task::spawn { let mut q = q; for i in range(0, nmsgs) { q.push(i); } + chan.send(()); } } @@ -240,6 +243,9 @@ mod tests { Data(_) => { i += 1 } } } + for _ in range(0, nthreads) { + port.recv(); + } } } |
