about summary refs log tree commit diff
path: root/src/test/run-pass/linked-failure.rs
blob: 7e9b1571efe3f68e39225e87badbfb9ffa7ea4b4 (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(&&_i: ()) { assert (1 == 2); }

fn parent(&&_i: ()) {
    // 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);
}