Arc is Rust’s atomically reference-counted smart pointer. It lets multiple threads share ownership of one value safely. “Atomic” means an operation finishes as a whole, so another thread cannot observe it halfway through. section 12.3
Use Arc when several threads need the same owned value. Create it with Arc::new, then make additional owners with Arc::clone. For shared mutable data, combine Arc with Mutex: Arc shares ownership, while Mutex controls access to the value. section 12.3
Sharing a counter between threads
use std::sync::{Arc, Mutex}; let my_number = Arc::new(Mutex::new(0)); let cloned_1 = Arc::clone(&my_number); let cloned_2 = Arc::clone(&my_number); // Each thread locks its clone before incrementing. *cloned_1.lock().unwrap() += 1; *cloned_2.lock().unwrap() += 1; After both threads finish, the protected counter contains the combined updates. The example uses move closures so each thread receives its Arc clone. section 12.3
Arc is similar to Rc, but it is designed for threads. Prefer Rc when only one thread is involved because it is faster; choose Arc when ownership crosses thread boundaries. section 12.0 section 12.3

