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