Arc lets multithreaded REST handlers share one heap-allocated store instead of copying it or passing ownership between handlers. Cloning an Arc clones a pointer to the same data and atomically increments its reference count; when the last owner goes out of scope, the stored value is dropped. Arc provides shared ownership, not mutable access: pair the store with a Mutex or RwLock when handlers need to mutate it. section 4.2.1
Shared question store
A question store can hold questions as Arc<RwLock<HashMap<QuestionId, Question>>>. Handlers read the map through the lock while Arc shares the store.
Figure 4.3 Instead of dropping the value x, Rust increments the Arc count. Whenever x or y are going out of scope, Rust decreases the count until it is at 0, and then calls .drop to remove the value from the heap.
Shows how cloning an Arc increments its count and how the value is dropped when the count reaches zero. section 4.2.1


