13 lines
195 B
Rust
13 lines
195 B
Rust
// -*- rust -*-
|
|
|
|
use std;
|
|
import std::task;
|
|
|
|
fn main() {
|
|
let i = 10;
|
|
while i > 0 { task::spawn(bind child(i)); i = i - 1; }
|
|
log "main thread exiting";
|
|
}
|
|
|
|
fn child(x: int) { log x; }
|
|
|