2011-08-06 12:07:39 -05:00
|
|
|
use std;
|
|
|
|
import std::comm;
|
2011-08-12 19:36:52 -05:00
|
|
|
import std::task;
|
2011-07-12 17:27:17 -05:00
|
|
|
|
2011-08-25 13:20:43 -05:00
|
|
|
fn start(c: comm::chan<comm::chan<int>>) {
|
|
|
|
let p: comm::port<int> = comm::port();
|
|
|
|
comm::send(c, comm::chan(p));
|
2011-08-06 12:07:39 -05:00
|
|
|
}
|
2010-08-11 17:05:33 -05:00
|
|
|
|
2011-04-19 15:35:49 -05:00
|
|
|
fn main() {
|
2011-08-25 13:20:43 -05:00
|
|
|
let p = comm::port();
|
|
|
|
let child = task::spawn(bind start(comm::chan(p)));
|
|
|
|
let c = comm::recv(p);
|
2011-08-06 12:07:39 -05:00
|
|
|
}
|