rust/src/test/run-pass/task-comm-13.rs
Marijn Haverbeke 3816e57fd2 Downcase std modules again, move to :: for module dereferencing
This should be a snapshot transition.
2011-05-12 21:30:44 +02:00

21 lines
424 B
Rust

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