core: Remove remaining use of Future
This commit is contained in:
parent
3e4b2bd2b2
commit
f500f3f1fb
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue