Rust 61 🦀 Spawning Threads and Thread Joining
Threads are the oldest and most direct form of concurrency in Rust. Long before async/await arrived, before tokio and async-std existed, Rust programmers used std::thread to run code in parallel. The standard library gives you two functions that matter: thread::spawn, which starts a new operating-system thread, and JoinHandle::join, which waits for that thread to finish…