rust/src/test/run-pass/threads.rs

14 lines
204 B
Rust

// -*- rust -*-
use std;
import task;
fn main() {
let i = 10;
while i > 0 { task::spawn(copy i, child); i = i - 1; }
#debug("main thread exiting");
}
fn child(&&x: int) { log(debug, x); }