2020-03-25 19:28:14 -07:00
|
|
|
// program should terminate when std::process::exit is called from any thread
|
|
|
|
|
2024-02-16 20:02:50 +00:00
|
|
|
//@ run-pass
|
2024-03-06 12:19:20 -08:00
|
|
|
//@ needs-threads
|
2020-03-25 19:28:14 -07:00
|
|
|
|
|
|
|
use std::{process, thread};
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let h = thread::spawn(|| {
|
|
|
|
process::exit(0);
|
|
|
|
});
|
|
|
|
let _ = h.join();
|
|
|
|
}
|