mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
14 lines
262 B
Rust
14 lines
262 B
Rust
// program should terminate when std::process::exit is called from any thread
|
|
|
|
// run-pass
|
|
// ignore-emscripten no threads support
|
|
|
|
use std::{process, thread};
|
|
|
|
fn main() {
|
|
let h = thread::spawn(|| {
|
|
process::exit(0);
|
|
});
|
|
let _ = h.join();
|
|
}
|