4 ms·
The article sort of mentions this, but I thought it should be pointed out fully: in c/c++ from the language standpoint it's impossible to have a data race witho
by Thorrez 7y ago
The article sort of mentions this, but I thought it should be pointed out fully: in c/c++ from the language standpoint it's impossible to have a data race without a race condition, because a data race is undefined behavior and that means anything can happen, including race conditions.
- CodesInChaos 7y agoI'd consider races of atomics with relaxed ordering data races, but those aren't UB per se.
- bshanks 7y agoThe C++ standard definition of a data race excludes races of atomics; http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4296.pdf http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n429... section 1.10.23, page 14 near the bottom: "The execution of a program contains a data race if it contains two ... ,at least one of which is not atomic, and ..."