rust/src/test/run-pass/task-comm-13.rs
Brian Anderson c53402846e Remove all xfail-stage0 directives
While it is still technically possible to test stage 0, it is not part of any
of the main testing rules and maintaining xfail-stage0 is a chore. Nobody
should worry about how tests fare in stage0.
2011-08-03 10:55:59 -07:00

15 lines
348 B
Rust

use std;
import std::task;
fn start(c: chan[int], start: int, number_of_messages: int) {
let i: int = 0;
while i < number_of_messages { c <| start + i; i += 1; }
}
fn main() {
log "Check that we don't deadlock.";
let p: port[int] = port();
let a: task = spawn start(chan(p), 0, 10);
task::join(a);
log "Joined task";
}