diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-10-22 19:16:52 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-10-23 14:21:15 -0700 |
| commit | f500f3f1fb4092bf7993170d755377268943e94b (patch) | |
| tree | cb58d88939d87f603039a55e9bfb15d9b91de92c | |
| parent | 3e4b2bd2b2f48c98dab73c67b0ddf25a80129a3c (diff) | |
core: Remove remaining use of Future
| -rw-r--r-- | src/libcore/private.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/libcore/private.rs b/src/libcore/private.rs index e7e9de39ccd..a65e0ae1bb1 100644 --- a/src/libcore/private.rs +++ b/src/libcore/private.rs @@ -581,16 +581,20 @@ pub mod tests { for uint::range(0, num_tasks) |_i| { let total = total.clone(); - futures.push(future::spawn(|move total| { + let (chan, port) = pipes::stream(); + futures.push(move port); + + do task::spawn |move total, move chan| { for uint::range(0, count) |_i| { do total.with |count| { **count += 1; } } - })); + chan.send(()); + } }; - for futures.each |f| { f.get() } + for futures.each |f| { f.recv() } do total.with |total| { assert **total == num_tasks * count |
