rust/src/test/run-pass/yield.rs
2012-01-06 22:40:31 -08:00

19 lines
293 B
Rust

// -*- rust -*-
use std;
import task;
import task::*;
fn main() {
let other = task::spawn_joinable {|| child(); };
#error("1");
yield();
#error("2");
yield();
#error("3");
join(other);
}
fn child() {
#error("4"); yield(); #error("5"); yield(); #error("6");
}