Skip to content

Commit 44fbe88

Browse files
authoredJul 27, 2020
Merge pull request #2361 from RalfJung/atomic
link to stdlib atomic docs
2 parents 89bd20a + 57fa4af commit 44fbe88

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎src/ch16-03-shared-state.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,12 @@ Fortunately, `Arc<T>` *is* a type like `Rc<T>` that is safe to use in
176176
concurrent situations. The *a* stands for *atomic*, meaning it’s an *atomically
177177
reference counted* type. Atomics are an additional kind of concurrency
178178
primitive that we won’t cover in detail here: see the standard library
179-
documentation for `std::sync::atomic` for more details. At this point, you just
179+
documentation for [`std::sync::atomic`] for more details. At this point, you just
180180
need to know that atomics work like primitive types but are safe to share
181181
across threads.
182182

183+
[`std::sync::atomic`]: ../std/sync/atomic/index.html
184+
183185
You might then wonder why all primitive types aren’t atomic and why standard
184186
library types aren’t implemented to use `Arc<T>` by default. The reason is that
185187
thread safety comes with a performance penalty that you only want to pay when

0 commit comments

Comments
 (0)
Please sign in to comment.