im not sure i agree with this. when i make mistakes with atomics, there is usually some kind of circularity or feedback going on, where the value stored in the atomic influences the later values that get written to that atomic. but using an atomic as a one-way conduit for some changing data for display purposes is not particularly hazardous.
i don’t get the impression that locks are as simple as you suggest. the type of lock needed here is likely some sort of reader-writer lock that permits concurrent readers. based on this thread the advice is to “write your own”, which i’m not enthusiastic about.