2011-08-15 18:54:02 -05:00
|
|
|
use std;
|
|
|
|
import std::comm::mk_port;
|
|
|
|
import std::comm::send;
|
2011-06-15 13:19:50 -05:00
|
|
|
|
2011-05-18 13:38:41 -05:00
|
|
|
/*
|
|
|
|
This is about the simplest program that can successfully send a
|
|
|
|
message.
|
|
|
|
*/
|
|
|
|
fn main() {
|
2011-08-15 18:54:02 -05:00
|
|
|
let po = mk_port[int]();
|
|
|
|
let ch = po.mk_chan();
|
|
|
|
send(ch, 42);
|
|
|
|
let r = po.recv();
|
2011-05-18 13:38:41 -05:00
|
|
|
log_err r;
|
2011-06-15 13:19:50 -05:00
|
|
|
}
|