RosettaCodeData/Task/Program-termination/Rust/program-termination-4.rust
2016-12-05 22:15:40 +01:00

12 lines
251 B
Text

use std::thread;
fn main() {
println!("The program is running");
thread::spawn(move|| {
println!("This is the second thread");
panic!("A runtime panic occured");
}).join();
println!("This line should be printed");
}