core: Remove remaining use of Future

This commit is contained in:
Brian Anderson 2012-10-22 19:16:52 -07:00
parent 3e4b2bd2b2
commit f500f3f1fb
1 changed files with 7 additions and 3 deletions

View File

@ -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