Rust Prevents Data Races, Not Race Conditions

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 Rustonomicon…