]> git.lizzy.rs Git - rust.git/blob - src/test/run-pass/yield.rs
43cfecf2045e944eb32251114b0468f68b3613a1
[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(&&_i: ()) {
17     #error("4"); yield(); #error("5"); yield(); #error("6");
18 }