This is doubly true when dealing with concurrency. You have to consider not only possible interleavings of side effects, but also possible reorderings of loads and stores by the compiler and the CPU.
I dunno where I picked it up, but my standard euphemism for writing lock-free code is “juggling knives”.
I dunno where I picked it up, but my standard euphemism for writing lock-free code is “juggling knives”.