rust/src/test/run-pass/task-comm-0.rs

21 lines
327 B
Rust
Raw Normal View History

// xfail-stage0
2011-04-19 15:35:49 -05:00
fn main() -> () {
test05();
}
2011-04-19 15:35:49 -05:00
fn test05_start(chan[int] ch) {
ch <| 10;
ch <| 20;
ch <| 30;
}
2011-04-19 15:35:49 -05:00
fn test05() {
let port[int] po = port();
let chan[int] ch = chan(po);
spawn test05_start(chan(po));
let int value <- po;
value <- po;
value <- po;
assert (value == 30);
}