rust/src/test/run-pass/threads.rs

19 lines
229 B
Rust
Raw Normal View History

// xfail-stage0
// xfail-stage1
// xfail-stage2
2010-06-23 23:03:09 -05:00
// -*- rust -*-
fn main() {
let int i = 10;
while (i > 0) {
2010-09-07 20:01:35 -05:00
spawn thread "child" child(i);
2010-06-23 23:03:09 -05:00
i = i - 1;
}
log "main thread exiting";
}
fn child(int x) {
log x;
}