3 ms·
How about treating it just like another thread accessing the values? So yes in the general case, no if you put in memory barriers or atomics.
by Dylan16807 11y ago
How about treating it just like another thread accessing the values? So yes in the general case, no if you put in memory barriers or atomics.
- caf 11y agoRace conditions are generally treated as "you get undefined behavior" for much the same reasons.
- Dylan16807 11y agoI mean race conditions on actual hardware, not the way the standard abandons all hope yet again. Stale reads don't require total chaos.