blob: 2f8ef9856887afc87cd0d93644c7345ebb2e5e8c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
// xfail-boot
// xfail-stage0
// xfail-stage1
// xfail-stage2
use std;
import std._task;
fn main() -> () {
test00();
}
fn start(int task_number) {
log "Started / Finished Task.";
}
fn test00() {
let int i = 0;
let task t = spawn thread "child" start(i);
// Sleep long enough for the task to finish.
_task.sleep(10000u);
// Try joining tasks that have already finished.
join t;
log "Joined Task.";
}
|