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

10 lines
200 B
Rust
Raw Normal View History

2010-08-11 17:05:33 -05:00
io fn start(chan[chan[str]] c) {
let port[str] p = port();
c <| chan(p);
}
io fn main() {
let port[chan[str]] p = port();
auto child = spawn "child" start(chan(p));
auto c <- p;
}