blob: b119ac6eb1d21064a6db5651357b6c11d0fe5448 (
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
|
// xfail-win32
use std;
import task;
import comm;
import uint;
fn die(&&_i: ()) {
fail;
}
fn iloop(&&_i: ()) {
task::unsupervise();
task::spawn((), die);
let p = comm::port::<()>();
let c = comm::chan(p);
while true {
// Sending and receiving here because these actions yield,
// at which point our child can kill us
comm::send(c, ());
comm::recv(p);
}
}
fn main() {
uint::range(0u, 16u) {|_i|
task::spawn((), iloop);
}
}
|