Yet another comm interface.

This commit is contained in:
Eric Holk 2011-08-16 17:12:46 -07:00
parent 72b2f8207d
commit efac7c9a19
3 changed files with 36 additions and 17 deletions

View file

@ -17,3 +17,11 @@ fn send_recv() {
log_err v;
assert(42 == v);
}
#[test]
fn send_recv_fn() {
let p = comm::port::<int>();
let c = comm::chan::<int>(p);
comm::send(c, 42);
assert(comm::recv(p) == 42);
}