fn main() { let thread_body = || { for i in 1..10 { println!("Count {}", i); std::thread::sleep(std::time::Duration::from_millis(100)); } }; let h = std::thread::spawn(thread_body); println!("Main thread, here!"); h.join(); }