Hum... okay. Maybe I'm not understanding what is meant by a data race here.
So your example would be:
function f() {
lastTime = Time.now();
}
And now if we had threads T1 and T2 calling f concurrently, you say this would be a data race?So I'm confused here. There's no bug, so a data race is not a category of defect the way race conditions are? Both your example and the article's example was a data race that is not a bug. Is there an example of a data race that is not a race condition yet leads to a bug?