rust/src/test/run-pass/task-comm-12.rs
2011-10-20 18:23:47 -07:00

20 lines
374 B
Rust

use std;
import std::task;
fn main() { test00(); }
fn# start(&&task_number: int) { log "Started / Finished task."; }
fn test00() {
let i: int = 0;
let t = task::spawn_joinable2(i, start);
// Sleep long enough for the task to finish.
task::sleep(10000u);
// Try joining tasks that have already finished.
task::join(t);
log "Joined task.";
}