summary refs log tree commit diff
path: root/src/test/run-pass/threads.rs
blob: aa55b47d40dc849d30c4024e0f826840f6e2a28c (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 {|| child(i); }; i = i - 1; }
    #debug("main thread exiting");
}

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