blob: d8f3d12d059b9747b0e14241fc81fe3055468aca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
use std;
import comm;
import task;
fn start(c: comm::chan<comm::chan<int>>) {
let p: comm::port<int> = comm::port();
comm::send(c, comm::chan(p));
}
fn main() {
let p = comm::port();
let child = task::spawn(comm::chan(p), start);
let c = comm::recv(p);
}
|