3 ms·
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.
by s17n 9y 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.
- kibwen 9y agoRust'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 https://doc.rust-lang.org/nomicon/races.html