rust/src/test/run-pass/issue-3168.rs

22 lines
488 B
Rust
Raw Normal View History

// xfail-fast
fn main() {
let (c,p) = pipes::stream();
2012-09-19 00:45:24 -05:00
do task::try |move c| {
let (c2,p2) = pipes::stream();
2012-09-19 00:45:24 -05:00
do task::spawn |move p2| {
p2.recv();
2012-09-19 00:45:24 -05:00
error!("sibling fails");
fail;
}
let (c3,p3) = pipes::stream();
2012-09-19 00:45:24 -05:00
c.send(move c3);
c2.send(());
error!("child blocks");
p3.recv();
};
error!("parent tries");
assert !p.recv().try_send(());
error!("all done!");
}