rust/src/test/run-pass/task-comm-11.rs
2012-08-28 14:33:18 -07:00

15 lines
251 B
Rust

use std;
import pipes;
import task;
fn start(c: pipes::Chan<pipes::Chan<int>>) {
let (ch, p) = pipes::stream();
c.send(ch);
}
fn main() {
let (ch, p) = pipes::stream();
let child = task::spawn(|| start(ch) );
let c = p.recv();
}