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:
parent
e33af7e0b5
commit
cf2def46c1
34 changed files with 326 additions and 600 deletions
|
|
@ -5,11 +5,12 @@
|
|||
|
||||
use std;
|
||||
import std::task;
|
||||
import std::comm::mk_port;
|
||||
|
||||
fn child() { assert (1 == 2); }
|
||||
|
||||
fn main() {
|
||||
let p: port[int] = port();
|
||||
let p = mk_port[int]();
|
||||
task::_spawn(bind child());
|
||||
let x: int; p |> x;
|
||||
let x = p.recv();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,17 @@
|
|||
// error-pattern:meep
|
||||
fn echo[T](c: chan[T], oc: chan[chan[T]]) {
|
||||
use std;
|
||||
import std::comm::_chan;
|
||||
import std::comm::mk_port;
|
||||
import std::comm::send;
|
||||
|
||||
fn echo[~T](c: _chan[T], oc: _chan[_chan[T]]) {
|
||||
// Tests that the type argument in port gets
|
||||
// visited
|
||||
let p = port[T]();
|
||||
oc <| chan(p);
|
||||
let p = mk_port[T]();
|
||||
send(oc, p.mk_chan());
|
||||
|
||||
let x;
|
||||
p |> x;
|
||||
c <| x;
|
||||
let x = p.recv();
|
||||
send(c, x);
|
||||
}
|
||||
|
||||
fn main() { fail "meep"; }
|
||||
fn main() { fail "meep"; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue