| ▲ | agalunar 11 hours ago | |
> A data race occurs any time two threads access the same memory location concurrently and non-deterministically when at least one of the accesses is a write. From what I understand of the C++ memory model (shared by C and Rust), this is not the definition of data race – a data race occurs when two or more threads access memory concurrently where at least one access is a write and the accesses are unsynchronized. However, synchronized accesses may not have a deterministic ordering, in which case a race condition occurs. (Confusing as it may be, I believe this is standard terminology.) | ||