Chapter 16: Fearless Concurrency
Using Threads to Run Code Simultaneously
Creating a New Thread with spawn
Waiting for All Threads to Finish Using join Handles
Using move Closures with Threads
Using Message Passing to Transfer Data Between Threads
Channels and Ownership Transference
Sending Multiple Values and Seeing the Receiver Waiting
Creating Multiple Producers by Cloning the Transmitter
Shared-State Concurrency
Using Mutexes to Allow Access to Data from One Thread at a Time
Similarities Between RefCell/Rc and Mutex/Arc
Extensible Concurrency with the Send and Sync Traits
Allowing Transference of Ownership Between Threads with Send
Allowing Access from Multiple Threads with Sync
Implementing Send and Sync Manually Is Unsafe