Lockless technique
Lock-free is a concurrency progress property that guarantees some operation completes within a finite number of steps despite contention, without relying on mutual-exclusion locks.
C++ Concurrency in Action, Second Edition
A progress guarantee under which, when threads continue taking steps, at least one operation completes despite contention.
- How it is used
- Provides a progress criterion for concurrent data structures that avoid mutex-protected operations.
- How deep it goes
- Defines progress guarantees and explains compare/exchange retries, then exposes unresolved reclamation in an initial stack.
- Examples
- Contrasts an atomic-flag spin-lock mutex with a compare/exchange stack whose initial pop leaks nodes.
- What you can do after
- Evaluate/understand it by checking whether concurrent operations progress and spotting starvation, hidden locks, and unsafe stack-node deletion.
Read how C++ Concurrency in Action, Second Edition explains lockless technique →
Modern C, Third Edition
The lock-free property indicates that operations on an atomic type do not require a hidden lock and are indivisible with respect to signal interruption.
- How it is used
- Supports uninterruptible operations on shared state in signal handlers.
- How deep it goes
- Defines uninterruptibility and distinguishes atomic counters from sig_atomic_t, without detailing atomic implementation.
- Examples
- Uses a conditionally enabled _Atomic(unsigned long) counter incremented by sh_count.
- What you can do after
- Apply it via C11 atomic types to select a signal-handler counter when the required lock-free property is available.
Read how Modern C, Third Edition explains lockless technique →
Latency
Lock-free synchronization is a concurrency technique that guarantees system-wide progress by ensuring that some thread completes an operation within a finite number of steps, without guaranteeing progress for every thread.
- How it is used
- Uses lock-free progress to reason about low-latency concurrent systems without requiring every thread to complete each operation.
- How deep it goes
- Defines system-wide finite progress and contrasts it with blocking and wait-free conditions, but does not detail an implementation algorithm.
- Examples
- Uses mutex waiting, long critical sections, deadlock, and competing lock acquisition to illustrate unpredictable blocking progress.
- What you can do after
- Evaluate concurrent designs by distinguishing system-wide lock-free progress from per-thread wait-free guarantees and blocking behavior.
Related concepts
- atomic operationuses · An atomic operation accesses or updates shared state as an indivisible action with respect to concurrent operations.
- optimistic concurrency controlincludes · Optimistic concurrency control is a concurrency-control technique that allows operations to proceed with limited locking and detects conflicting changes through validation before committing updates.
- spinlockcontrasts with · A spinlock is a mutual-exclusion synchronization primitive in which a waiting thread repeatedly checks or attempts to acquire the lock rather than blocking.
- atomincludes · An atom is a Clojure reference type that supports synchronous, independent, coordinated updates to shared state without explicit locks.
- compare-and-exchange operationuses · A compare-and-exchange operation atomically replaces a value with a desired value only if the current value matches an expected value.
- ImmutableInterlockedimplemented by · ImmutableInterlocked is a .NET API that provides atomic operations for updating references to immutable collections and related immutable values.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


