Rewrote receive to return a value. This lets us initialize variables by receiving them.

This commit is contained in:
Eric Holk 2011-08-02 12:29:10 -07:00
parent 244efa6331
commit 200bbcf91b
4 changed files with 12 additions and 12 deletions

View file

@ -13,8 +13,7 @@ fn send_recv() {
let c = p.mk_chan();
c.send(42);
let v = 0;
p.recv_into(v);
let v = p.recv();
log_err v;
assert(42 == v);
}
}