Last Updated: February 5, 2026
Building on the Compare-and-Swap primitive from the previous chapter, this chapter explores the full suite of atomic operations available in modern languages. More importantly, we dive deep into memory ordering, the invisible rules that govern how threads see each other's writes.
This is where lock-free programming gets subtle, and where many experienced developers get tripped up.