-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Description
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.
Metadata
Metadata
Assignees
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.