CAS-Based Locks: From Spinlocks to Queue Locks - Compare-and-Swap: Foundation of Lock-Free Concurrency | OneNoughtOne