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

19 lines
297 B
Rust
Raw Normal View History

2010-06-23 23:03:09 -05:00
// -*- rust -*-
use std;
import task;
import task::*;
2010-06-23 23:03:09 -05:00
fn main() {
let other = task::spawn_joinable((), child);
#error("1");
yield();
#error("2");
yield();
#error("3");
join(other);
2010-06-23 23:03:09 -05:00
}
2011-10-20 22:34:04 -05:00
fn child(&&_i: ()) {
#error("4"); yield(); #error("5"); yield(); #error("6");
}