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