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.
15 lines
348 B
Rust
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";
|
|
} |