|
|
|
|
|
by didibus
2524 days ago
|
|
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? |
|
Truly I'm still not sure why the author had to make a point and write a blog post about the conceptual difference between data races and race conditions.