Files
Rust-High-Performance/Chapter10/example3.rs
2018-03-28 11:19:46 +05:30

14 lines
275 B
Rust

use std::thread;
fn main() {
println!("Before the thread!");
let handle = thread::spawn(|| {
println!("Inside the thread!");
});
println!("After thread spawn!");
handle.join().expect("the thread panicked");
println!("After everything!");
}