News for hackers. Stuff that matters.
Re:Adding Optimistic Locking to an API by karmakaze on Saturday August 28, 2021 @11:46AM (#28338966)
The point to call Optimistic Locking by its other name Optimistic Concurrency Control (OCC) is a great one and I'll be doing that from now on.

In the spirit of trying to keep this complex subject free of misrepresentation... Compare-and-set (CAS, or alternatively compare-and-swap) is commonly used to implement lock-free algorithms.

A 'spin lock' where a thread uses only CAS in a tight loop and not carrying on until the lock is acquired is indeed a lock and not a kind of non-blocking or lock-free algorithm.

There are no comments on this comment yet.