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