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

fn x(str s, int n) {
  log s;
  log n;
}

fn main() {
  spawn x("hello from first spawned fn", 65);
  spawn x("hello from second spawned fn", 66);
  spawn x("hello from third spawned fn", 67);
  let int i = 30;
  while (i > 0) {
    i = i - 1;
    log "parent sleeping";
    yield;
  }
}