check-then-act
Testing shared state and then acting on the answer, which another thread may make stale in between.
A compound action such as if (!map.containsKey(k)) map.put(k, v) or lazy initialization; it is safe only if the check and the act happen as one atomic step.
See also