We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e4b2bd commit f500f3fCopy full SHA for f500f3f
src/libcore/private.rs
@@ -581,16 +581,20 @@ pub mod tests {
581
582
for uint::range(0, num_tasks) |_i| {
583
let total = total.clone();
584
- futures.push(future::spawn(|move total| {
+ let (chan, port) = pipes::stream();
585
+ futures.push(move port);
586
+
587
+ do task::spawn |move total, move chan| {
588
for uint::range(0, count) |_i| {
589
do total.with |count| {
590
**count += 1;
591
}
592
- }));
593
+ chan.send(());
594
+ }
595
};
596
- for futures.each |f| { f.get() }
597
+ for futures.each |f| { f.recv() }
598
599
do total.with |total| {
600
assert **total == num_tasks * count
0 commit comments