mention Arc::make_mut alongside Mutex #138322
Labels
A-docs
Area: Documentation for any part of the project, including the compiler, standard library, and tools
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
Location
https://doc.rust-lang.org/stable/std/sync/struct.Arc.html
Summary
The prose here mentions how Arc does not provide interior mutability, but in many cases you don't actually need shared interior mutability, just the ability to effeciently mutate something that happens to be in an
Arc
.Seeing how many people who are new to rust gravitate towards
Arc<Mutex<T>>
to avoid dealing with references, it would probably be good to mention copy-on-write semantics as an alternative.The text was updated successfully, but these errors were encountered: