2011-08-09 23:07:49 +00:00
|
|
|
// FIXME: this test is xfailed until sending strings is legal again.
|
|
|
|
|
2011-08-31 11:22:58 +00:00
|
|
|
//xfail-test
|
2011-08-09 23:07:49 +00:00
|
|
|
|
2011-07-12 22:27:17 +00:00
|
|
|
use std;
|
|
|
|
import std::task;
|
2011-08-06 17:07:39 +00:00
|
|
|
import std::comm;
|
2011-07-12 22:27:17 +00:00
|
|
|
|
2011-08-10 16:27:22 +00:00
|
|
|
fn start(c: comm::_chan<str>) {
|
2011-08-13 07:10:18 +00:00
|
|
|
let p = comm::mk_port::<str>();
|
2011-08-08 20:38:20 +00:00
|
|
|
c.send(p.mk_chan().unsafe_ptr());
|
2011-07-18 19:02:26 +00:00
|
|
|
|
2011-07-29 01:01:27 +00:00
|
|
|
let a;
|
|
|
|
let b;
|
2011-08-06 17:07:39 +00:00
|
|
|
a = p.recv();
|
2011-07-18 19:02:26 +00:00
|
|
|
log_err a;
|
2011-08-06 17:07:39 +00:00
|
|
|
b = p.recv();
|
2011-07-18 19:02:26 +00:00
|
|
|
log_err b;
|
2010-08-11 22:05:33 +00:00
|
|
|
}
|
|
|
|
|
2011-04-19 20:35:49 +00:00
|
|
|
fn main() {
|
2011-08-13 22:20:11 +00:00
|
|
|
let p = comm::mk_port();
|
|
|
|
let child = task::_spawn(bind start(p.mk_chan()));
|
2011-07-18 19:02:26 +00:00
|
|
|
|
2011-08-13 22:20:11 +00:00
|
|
|
let c = p.recv();
|
2011-08-06 17:07:39 +00:00
|
|
|
c.send("A");
|
|
|
|
c.send("B");
|
2011-07-12 22:27:17 +00:00
|
|
|
task::yield();
|
2011-08-06 17:07:39 +00:00
|
|
|
}
|