Rust Prevents Data Races, Not Race Conditions (opens in new tab)
Safe Rust eliminates all data races. What it does not do is prevent race conditions in the broader sense: deadlocks, livelocks, and logic bugs in your synchronization. What’s the difference? These two terms get used interchangeably all the time, even by experienced developers, so it’s worth writing down exactly what Rust promises and what it does not. What Is a Data Race? To quote the Safe Rust guarantees an absence of data races, which are defined as: two or more threads concurrently accessi...
Read the original article