aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass/threads.rs
blob: 4dd87e9cb097172709ea2b75206e05720c7cdc6b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// xfail-stage0
// xfail-stage1
// xfail-stage2
// -*- rust -*-

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

fn child(int x) {
  log x;
}