Skip to content

Commit 74fb069

Browse files
committed
Adding atomic type definition to the glossary
1 parent 5266fb9 commit 74fb069

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/concurrency.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ r[concurrency.atomics]
8181
## Atomics
8282

8383
r[concurrency.atomics.intro]
84-
Atomic types allow multiple threads to safely read and write shared values without using explicit locks by providing atomic operations such as atomic loads, stores, and read-modify-write with configurable memory ordering.
84+
[Atomic types] allow multiple threads to safely read and write shared values without using explicit locks by providing atomic operations such as atomic loads, stores, and read-modify-write with configurable memory ordering.
8585

8686
```rust
8787
use std::sync::atomic::{AtomicUsize, Ordering};
@@ -114,3 +114,4 @@ fn main() {
114114
[unsafe traits]: items/traits.md#unsafe-traits
115115
[marker traits]: glossary.md#marker-trait
116116
[`core::future::Future`]: https://doc.rust-lang.org/stable/core/future/trait.Future.html
117+
[Atomic types]: glossary.md#atomic-types

src/glossary.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ items are defined in [implementations] and declared in [traits]. Only
3030
functions, constants, and type aliases can be associated. Contrast to a [free
3131
item].
3232

33+
### Atomic types
34+
35+
Atomic types provide primitive shared-memory communication between threads, and are the building blocks of other concurrent types.
36+
3337
### Blanket implementation
3438

3539
Any implementation where a type appears [uncovered](#uncovered-type). `impl<T> Foo

0 commit comments

Comments
 (0)