2 ms·
It's worth keeping in mind that updates that are not guarded by some kind of barrier are generally not guaranteed to be visible cross-thread / process / server
by Groxx 2y ago
It's worth keeping in mind that updates that are not guarded by some kind of barrier are generally not guaranteed to be visible cross-thread / process / server / etc in the order you wrote them. And reorders are rather common in many languages / hardware types / storage systems / log collectors (including stdout because "do thing" and "log that you did it" are evidently not guarded together if there's a race happening), it's not just a theoretical concern.
Generally speaking though: yes, writing it down can help A LOT, and starting with what you can see is one of those obvious-in-retrospect things that are easily forgotten when under pressure. There are often a LOT of possibilities, and getting it out of your head so you can enumerate them more precisely can super duper important. Intuition for problematic sequences to check first will come with time.