We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8107a0e commit dc894b1Copy full SHA for dc894b1
src/concurrency/shared_state/arc.md
@@ -23,3 +23,12 @@ fn main() {
23
```
24
25
[1]: https://doc.rust-lang.org/std/sync/struct.Arc.html
26
+
27
+<details>
28
29
+* `Arc` stands for "Atomic Reference Counted", a thread safe version of `Rc` that uses atomic operations.
30
+* `Arc::clone()` has the cost of atomic operations that get executed, but after that the use of the `T` is free.
31
+* Beware of reference cycles, Rust does not have a garbage collector to detect those.
32
+ * `std::sync::Weak` can help.
33
34
+</details>
0 commit comments