blob: a3f5b6e4d37a8eeb3a093045878d4a845bfb183c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// -*- rust -*-
// error-pattern:fail
extern mod std;
use comm::Port;
use comm::recv;
fn grandchild() { fail ~"grandchild dies"; }
fn child() {
let p = Port::<int>();
task::spawn(|| grandchild() );
let x = recv(p);
}
fn main() {
let p = Port::<int>();
task::spawn(|| child() );
let x = recv(p);
}
|