summaryrefslogtreecommitdiffstats
path: root/src/test/ui/threads-sendsync/yield1.rs
blob: 002e590550c36a4461be4e5e85438036581c6dd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// run-pass

#![allow(unused_must_use)]
#![allow(unused_mut)]
// ignore-emscripten no threads support

use std::thread;

pub fn main() {
    let mut result = thread::spawn(child);
    println!("1");
    thread::yield_now();
    result.join();
}

fn child() { println!("2"); }