Add note about duplication of `1` in M.O.

pull/378/head
SabrinaJewson 2 years ago
parent 52d5d13a3d
commit 40b06fef66
No known key found for this signature in database
GPG Key ID: 3D5438FFA5F05564

@ -122,7 +122,10 @@ pub fn get_id() -> u64 {
``` ```
But then calling that function from multiple threads opens you up to an But then calling that function from multiple threads opens you up to an
execution like below that results in two threads obtaining the same ID: execution like below that results in two threads obtaining the same ID (note
that the duplication of `1` in the modification order is intentional; even if
two values are the same, they always get separate entries in the order if they
were caused by different accesses):
```text ```text
Thread 1 COUNTER Thread 2 Thread 1 COUNTER Thread 2

Loading…
Cancel
Save