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

use std;
import task;

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

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