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

use std;
import task;

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); }