summary refs log tree commit diff
path: root/src/test/run-fail/task-comm-recv-block.rs
blob: 50a32ed296ced1b9bdd637ecc94df31eb2b2de8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// error-pattern:goodfail

use std;
import task;
import comm;

fn goodfail() {
    task::yield();
    fail "goodfail";
}

fn main() {
    task::spawn {|| goodfail(); };
    let po = comm::port();
    // We shouldn't be able to get past this recv since there's no
    // message available
    let i: int = comm::recv(po);
    fail "badfail";
}