2011-03-25 12:19:20 -07:00
|
|
|
// xfail-stage0
|
2010-08-09 06:53:37 -07:00
|
|
|
// -*- rust -*-
|
|
|
|
|
2011-07-27 14:19:39 +02:00
|
|
|
fn a(c: chan[int]) { c <| 10; }
|
2010-08-09 06:53:37 -07:00
|
|
|
|
2011-04-19 13:35:49 -07:00
|
|
|
fn main() {
|
2011-07-27 14:19:39 +02:00
|
|
|
let p: port[int] = port();
|
2010-08-09 06:53:37 -07:00
|
|
|
spawn a(chan(p));
|
|
|
|
spawn b(chan(p));
|
2011-07-27 14:19:39 +02:00
|
|
|
let n: int = 0;
|
2011-05-27 11:59:19 -07:00
|
|
|
p |> n;
|
|
|
|
p |> n;
|
2011-07-27 14:19:39 +02:00
|
|
|
// log "Finished.";
|
2010-08-09 06:53:37 -07:00
|
|
|
}
|
|
|
|
|
2011-07-27 14:19:39 +02:00
|
|
|
fn b(c: chan[int]) {
|
|
|
|
// log "task b0";
|
|
|
|
// log "task b1";
|
|
|
|
// log "task b2";
|
|
|
|
// log "task b3";
|
|
|
|
// log "task b4";
|
|
|
|
// log "task b5";
|
2010-08-09 06:53:37 -07:00
|
|
|
c <| 10;
|
|
|
|
}
|