summary refs log tree commit diff
path: root/src/test/run-pass/yield.rs
blob: eb4a74c141abd9f020b6f9eb10d7c33a5d0506bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// -*- rust -*-
use std;
import task;
import task::*;

fn main() {
    let other = task::spawn_joinable {|| child(); };
    #error("1");
    yield();
    #error("2");
    yield();
    #error("3");
    join(other);
}

fn child() {
    #error("4"); yield(); #error("5"); yield(); #error("6");
}