2011-03-25 14:19:20 -05:00
|
|
|
// xfail-stage0
|
2011-05-03 20:13:51 -05:00
|
|
|
// 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;
|
|
|
|
}
|
|
|
|
|