Skip to content

Commit f500f3f

Browse files
committed
core: Remove remaining use of Future
1 parent 3e4b2bd commit f500f3f

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/libcore/private.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -581,16 +581,20 @@ pub mod tests {
581581

582582
for uint::range(0, num_tasks) |_i| {
583583
let total = total.clone();
584-
futures.push(future::spawn(|move total| {
584+
let (chan, port) = pipes::stream();
585+
futures.push(move port);
586+
587+
do task::spawn |move total, move chan| {
585588
for uint::range(0, count) |_i| {
586589
do total.with |count| {
587590
**count += 1;
588591
}
589592
}
590-
}));
593+
chan.send(());
594+
}
591595
};
592596

593-
for futures.each |f| { f.get() }
597+
for futures.each |f| { f.recv() }
594598

595599
do total.with |total| {
596600
assert **total == num_tasks * count

0 commit comments

Comments
 (0)