Skip to content

Commit

Permalink
Merge pull request #470 from Enselic/fix-race
Browse files Browse the repository at this point in the history
races.md: data race -> race condition to violate memory safety
  • Loading branch information
JohnTitor authored Dec 10, 2024
2 parents 0674321 + 6855d3a commit 97e84a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/races.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ thread::spawn(move || {
println!("{}", data[idx.load(Ordering::SeqCst)]);
```

We can cause a data race if we instead do the bound check in advance, and then
unsafely access the data with an unchecked value:
We can cause a race condition to violate memory safety if we instead do the bound
check in advance, and then unsafely access the data with an unchecked value:

```rust,no_run
use std::thread;
Expand Down

0 comments on commit 97e84a3

Please sign in to comment.