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

21 lines
325 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;
2010-08-09 08:53:37 -05:00
check(value == 30);
}