Rehabilitate run-fail/linked-failure4.rs
This commit is contained in:
parent
b2dd5f5cff
commit
9b9fc33663
@ -1,31 +1,27 @@
|
||||
// -*- rust -*-
|
||||
// error-pattern:1 == 2
|
||||
// xfail-test Been deadlocking on mac
|
||||
use std;
|
||||
import std::task;
|
||||
import std::comm::chan;
|
||||
import std::comm::port;
|
||||
import std::comm::recv;
|
||||
|
||||
fn child() { assert (1 == 2); }
|
||||
fn child(&&_args: ()) { assert (1 == 2); }
|
||||
|
||||
fn parent() {
|
||||
fn parent(&&_args: ()) {
|
||||
let p = port::<int>();
|
||||
let f = child;
|
||||
task::spawn(f);
|
||||
task::spawn((), child);
|
||||
let x = recv(p);
|
||||
}
|
||||
|
||||
// This task is not linked to the failure chain, but since the other
|
||||
// tasks are going to fail the kernel, this one will fail too
|
||||
fn sleeper() {
|
||||
fn sleeper(&&_args: ()) {
|
||||
let p = port::<int>();
|
||||
let x = recv(p);
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let g = sleeper;
|
||||
task::spawn(g);
|
||||
let f = parent;
|
||||
task::spawn(f);
|
||||
task::spawn((), sleeper);
|
||||
task::spawn((), parent);
|
||||
}
|
Loading…
Reference in New Issue
Block a user