Hacker News new | ask | show | jobs
by MontagFTB 1173 days 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.