Hacker News new | ask | show | jobs
by s17n 3135 days ago
Given the a "data race" is essentially defined to be the class of races that Rust's type system guards again, yeah it saves you from all of them.
1 comments

Rust's definition of "data race" isn't just "what the Rust compiler rejects", it has a specific meaning:

"Safe Rust guarantees an absence of data races, which are defined as: 1. two or more threads concurrently accessing a location of memory, 2. one of them is a write, 3. one of them is unsynchronized."

https://doc.rust-lang.org/nomicon/races.html