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

25 lines
274 B
Rust
Raw Normal View History

// xfail-stage0
2010-06-23 23:03:09 -05:00
// -*- rust -*-
use std;
import std::task::*;
2010-06-23 23:03:09 -05:00
fn main() {
auto other = spawn child();
log_err "1";
yield();
log_err "2";
yield();
log_err "3";
join(other);
2010-06-23 23:03:09 -05:00
}
fn child() {
log_err "4";
yield();
log_err "5";
yield();
log_err "6";
2010-06-23 23:03:09 -05:00
}