Conceptual
Login

Data Race

Two threads access the same memory location concurrently, at least one access is a write, and no synchronization orders them. In C, C++, and Rust a data race is undefined behavior, not merely a nondeterministic result.

Questions this Concept answers

  • Why does Rust's ownership and borrowing model rule out data races in safe code?