mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-15 19:08:20 +00:00
14 lines
241 B
Rust
14 lines
241 B
Rust
// program should terminate when std::process::exit is called from any thread
|
|
|
|
//@ run-pass
|
|
//@ needs-threads
|
|
|
|
use std::{process, thread};
|
|
|
|
fn main() {
|
|
let h = thread::spawn(|| {
|
|
process::exit(0);
|
|
});
|
|
let _ = h.join();
|
|
}
|