blob: 7302bcdaa94d47d1a66f8ff6c0e88384b83f3441 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// xfail-fast
#[legacy_modes];
extern mod std;
use pipes::send;
fn start(c: pipes::Chan<int>, start: int, number_of_messages: int) {
let mut i: int = 0;
while i < number_of_messages { c.send(start + i); i += 1; }
}
fn main() {
debug!("Check that we don't deadlock.");
let (ch, p) = pipes::stream();
task::try(|| start(ch, 0, 10) );
debug!("Joined task");
}
|