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