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