blob: b82aa7c2cb0a78c3b9242a3cb72e1c63bf1bb28e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// -*- rust -*-
// xfail-win32
use std;
import task;
import comm::port;
import comm::recv;
fn child() { assert (1 == 2); }
fn parent() {
// Since this task isn't supervised it won't bring down the whole
// process
task::unsupervise();
let p = port::<int>();
task::spawn {|| child(); };
let x = recv(p);
}
fn main() {
task::spawn {|| parent(); };
}
|