Removed trans_comm.rs from the compiler. Updating aio/sio to work with the new chan and port system, started on a networking module for the standard library.

This commit is contained in:
Eric Holk 2011-08-15 16:54:02 -07:00
parent e33af7e0b5
commit cf2def46c1
34 changed files with 326 additions and 600 deletions

View file

@ -1,5 +1,9 @@
// Sanity-check the code examples that appear in the object system
// documentation.
use std;
import std::comm::_chan;
import std::comm::send;
import std::comm::mk_port;
fn main() {
@ -43,9 +47,9 @@ fn main() {
}
}
obj sender(c: chan[int]) {
obj sender(c: _chan[int]) {
fn take(z: int) {
c <| z;
send(c, z);
}
}
@ -55,10 +59,10 @@ fn main() {
t.take(3);
}
let p: port[int] = port();
let p = mk_port[int]();
let t1: taker = adder(@mutable 0);
let t2: taker = sender(chan(p));
let t2: taker = sender(p.mk_chan());
give_ints(t1);
give_ints(t2);