rust/src/test/run-pass/trivial-message.rs

13 lines
219 B
Rust
Raw Normal View History

2012-09-05 14:32:05 -05:00
use pipes::{Port, Chan};
/*
This is about the simplest program that can successfully send a
message.
*/
fn main() {
2012-07-25 16:05:06 -05:00
let (ch, po) = pipes::stream();
ch.send(42);
let r = po.recv();
log(error, r);
}