By default, when the main thread of a Rust program completes, all spawned threads are shut down, whether or not they have finished running.
Waiting for All Threads to Finish Using
move, to indicate that the closure is going to take ownership of the values it’s capturing.
mpsc: multiple producer, single consumer
- Channels - Rust By Example