2010-06-23 21:03:09 -07:00
|
|
|
// -*- rust -*-
|
2011-05-31 17:44:54 -07:00
|
|
|
use std;
|
2011-08-12 18:34:19 -07:00
|
|
|
import std::task;
|
2011-05-31 17:44:54 -07:00
|
|
|
import std::task::*;
|
|
|
|
|
2010-06-23 21:03:09 -07:00
|
|
|
fn main() {
|
2011-08-17 11:44:35 -07:00
|
|
|
let f = child;
|
2011-08-25 11:20:43 -07:00
|
|
|
let other = task::spawn_joinable(f);
|
2011-06-15 11:19:50 -07:00
|
|
|
log_err "1";
|
|
|
|
yield();
|
|
|
|
log_err "2";
|
|
|
|
yield();
|
|
|
|
log_err "3";
|
2011-08-25 11:20:43 -07:00
|
|
|
join(other);
|
2010-06-23 21:03:09 -07:00
|
|
|
}
|
|
|
|
|
2011-08-19 15:16:48 -07:00
|
|
|
fn child() { log_err "4"; yield(); log_err "5"; yield(); log_err "6"; }
|