]> git.lizzy.rs Git - rust.git/blob - src/test/run-pass/yield.rs
port over the tests to use the new API
[rust.git] / src / test / run-pass / yield.rs
1 // -*- rust -*-
2 use std;
3 import task;
4 import task::*;
5
6 fn main() {
7     let other = task::spawn_joinable {|| child(); };
8     #error("1");
9     yield();
10     #error("2");
11     yield();
12     #error("3");
13     join(other);
14 }
15
16 fn child() {
17     #error("4"); yield(); #error("5"); yield(); #error("6");
18 }