summary refs log tree commit diff
path: root/src/test/run-pass/threads.rs
blob: d0cf650d308caa7a5826aa11144f0c22675d2430 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// -*- rust -*-

extern mod std;

fn main() {
    let mut i = 10;
    while i > 0 { task::spawn(|copy i| child(i) ); i = i - 1; }
    debug!("main thread exiting");
}

fn child(&&x: int) { log(debug, x); }