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();
|
|
|
|
do task::try {
|
|
|
|
let (c2,p2) = pipes::stream();
|
|
|
|
do task::spawn {
|
|
|
|
p2.recv();
|
2012-10-12 14:32:36 -05:00
|
|
|
error!("brother fails");
|
2012-08-10 18:17:53 -05:00
|
|
|
fail;
|
|
|
|
}
|
|
|
|
let (c3,p3) = pipes::stream();
|
|
|
|
c.send(c3);
|
|
|
|
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
|
|
|
}
|