2011-09-09 15:25:06 -05:00
|
|
|
// xfail-win32
|
2011-09-07 19:01:24 -05:00
|
|
|
use std;
|
|
|
|
import std::task;
|
|
|
|
import std::comm;
|
|
|
|
|
|
|
|
resource complainer(c: comm::chan<bool>) {
|
|
|
|
comm::send(c, true);
|
|
|
|
}
|
|
|
|
|
2011-09-12 11:36:51 -05:00
|
|
|
fn f(-c: comm::chan<bool>) {
|
2011-09-07 19:01:24 -05:00
|
|
|
task::unsupervise();
|
|
|
|
let c <- complainer(c);
|
|
|
|
fail;
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let p = comm::port();
|
|
|
|
let c = comm::chan(p);
|
|
|
|
task::spawn(bind f(c));
|
|
|
|
assert comm::recv(p);
|
|
|
|
}
|