01Compare-and-Swap: The Atomic Primitive Behind Lock-Free ProgrammingCompare-and-swap gave processors an atomic conditional update primitive powerful enough to build lock-free algorithms and, in theory, solve consensus for any number of threads.↗