The other coordination style is shared state: several threads reading and writing one piece of data. The danger is obvious — two threads writing at once corrupts it. Rust's safe shared-mutable type is Arc<Mutex<T>>.
Mutex: one thread at a time
A Mutex<T> (mutual exclusion) guards its inner value: a thread calls .lock() to get exclusive access, and no other thread can lock it until the first releases. The lock returns a guard; you mutate through the guard, and when the guard drops (end of scope — RAII again) the lock releases automatically. You literally cannot reach the data without holding the lock.
Arc to share the Mutex
A Mutex alone has one owner. To let multiple threads reach it, wrap it in an Arc: Arc<Mutex<T>>. Each thread gets a cloned Arc handle to the same Mutex. The Arc shares ownership across threads; the Mutex serializes access. This is the exact multi-threaded parallel of Rc<RefCell<T>> from the Smart Pointers track.
Arc<Mutex<T>> gives many threads safe shared-mutable access: clone the Arc to share, lock the Mutex to mutate one-at-a-time. The lock guard's Drop releases it automatically — you can't forget to unlock.The compiler still has your back
You can't accidentally read the data without locking — the value lives inside the Mutex, only reachable through .lock(). And you can't share a bare Mutex across threads without the Arc; the compiler requires it. Even the 'shared mutable state' path, the most dangerous in other languages, is race-free by construction here.