blob: d8586e7ef39c7dd514b289a5aae1710d595190bb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
// xfail-fast
#[legacy_modes];
extern mod std;
use pipes::Chan;
use pipes::Port;
fn main() { test05(); }
fn test05_start(ch : Chan<int>) {
ch.send(10);
error!("sent 10");
ch.send(20);
error!("sent 20");
ch.send(30);
error!("sent 30");
}
fn test05() {
let (ch, po) = pipes::stream();
task::spawn(|| test05_start(ch) );
let mut value = po.recv();
log(error, value);
value = po.recv();
log(error, value);
value = po.recv();
log(error, value);
assert (value == 30);
}
|