rust/src/test/run-pass/unique-send.rs

9 lines
158 B
Rust
Raw Normal View History

extern mod std;
fn main() {
2012-08-27 16:22:25 -05:00
let p = comm::Port();
2012-10-03 16:38:01 -05:00
let c = comm::Chan(&p);
comm::send(c, ~100);
let v = comm::recv(p);
assert v == ~100;
}