2011-03-25 12:19:20 -07:00
|
|
|
// xfail-stage0
|
2011-04-19 13:35:49 -07:00
|
|
|
fn main() -> () {
|
2010-07-19 14:05:18 -07:00
|
|
|
test05();
|
|
|
|
}
|
|
|
|
|
2011-04-19 13:35:49 -07:00
|
|
|
fn test05_start(chan[int] ch) {
|
2010-07-19 14:05:18 -07:00
|
|
|
ch <| 10;
|
|
|
|
ch <| 20;
|
|
|
|
ch <| 30;
|
|
|
|
}
|
|
|
|
|
2011-04-19 13:35:49 -07:00
|
|
|
fn test05() {
|
2010-07-19 14:05:18 -07:00
|
|
|
let port[int] po = port();
|
|
|
|
let chan[int] ch = chan(po);
|
|
|
|
spawn test05_start(chan(po));
|
2011-05-27 11:59:19 -07:00
|
|
|
let int value; po |> value;
|
|
|
|
po |> value;
|
|
|
|
po |> value;
|
2011-05-02 17:47:24 -07:00
|
|
|
assert (value == 30);
|
2010-07-19 14:05:18 -07:00
|
|
|
}
|