4 ms·
Holding the reference to a field that is protected by a mutex implies there is another thread out there that will race with your reference in either reading or
by MontagFTB 4y ago
Holding the reference to a field that is protected by a mutex implies there is another thread out there that will race with your reference in either reading or writing it.
Even just a read is racy, as there is no “atomic read” of any size value if it is not already wrapped as atomic.