Livelock
A livelock is a concurrency failure in which active threads or tasks repeatedly respond to one another without making useful overall progress.
Modern C, Third Edition
A livelock is a concurrency failure in which threads continue executing but repeatedly make no effective progress in response to one another.
- How it is used
- Explains livelock as a threaded-program failure in which apparent activity masks the absence of progress.
- How deep it goes
- Defines repeating control-loop behavior, contrasts it with deadlock, and points toward case analysis without developing a full prevention method.
- Examples
- Uses cyclic traffic detours and interacting vehicles to model threads that repeatedly change behavior without escaping.
- What you can do after
- Evaluate threaded behavior by distinguishing blocked waits from active repetition and by analyzing possible state cycles.
Grokking Concurrency
A livelock is a concurrency failure in which tasks remain active but repeatedly relinquish and reacquire resources without making progress.
- How it is used
- Explains a concurrency failure that helps distinguish active nonprogress from blocked execution.
- How deep it goes
- Explains the lock cycle through analogy, philosophers, effects, and Python code, but does not provide a detailed detection algorithm.
- Examples
- Uses a simultaneous-phone-call analogy, dining philosophers, chopsticks, and a Python threading listing.
- What you can do after
- Diagnose repeated lock concessions and reduce livelock by applying hierarchical lock ordering.
C++ Concurrency in Action, Second Edition
A livelock is a state in which threads repeatedly change or retry operations in response to one another without making useful progress.
- How it is used
- Explains livelock as a risk of lock-free data structures and a cause of unwanted blocking symptoms.
- How deep it goes
- Defines the retry cycle, contrasts active checking with blocking, and describes symptoms without detailing detection procedures.
- Examples
- Uses two threads repeatedly invalidating each other’s operations and an analogy of people retrying passage through a narrow gap.
- What you can do after
- Diagnose possible livelock from stalled progress combined with active thread execution and high CPU usage.
Read how C++ Concurrency in Action, Second Edition explains livelock →
Also covered in
What to know first
- deadlockA deadlock is a state in which concurrent activities cannot progress because each is waiting for a resource, event, or action that depends on another blocked activity.
- lockingLocking is a synchronization technique that controls concurrent access to a shared resource or protected operation.
Related concepts
- wait-free synchronizationcontrasts with · A concurrency technique in which every operation completes in a bounded number of steps, regardless of the actions or delays of other threads.
- concurrency bugkind of · A concurrency bug is a software defect in which overlapping operations interact to produce unintended or incorrect behavior.
- starvationkind of · Starvation is a condition in which a task is persistently denied the resources or execution opportunities it needs to make progress.
- deadlockcontrasts with · A deadlock is a state in which concurrent activities cannot progress because each is waiting for a resource, event, or action that depends on another blocked activity.
- timeoutproduced by · A timeout is a configured time limit after which an incomplete operation or wait is stopped, abandoned, or treated as unsuccessful.
Questions about livelock
What is livelock?
A livelock is a concurrency failure in which active threads or tasks repeatedly respond to one another without making useful overall progress.
Which Manning books explain livelock?
Modern C, Third Edition, Grokking Concurrency and C++ Concurrency in Action, Second Edition.
What should I know before learning livelock?
Manning books that teach livelock usually introduce deadlock and locking first.
What is the difference between livelock and wait-free synchronization?
A livelock is a concurrency failure in which active threads or tasks repeatedly respond to one another without making useful overall progress. A concurrency technique in which every operation completes in a bounded number of steps, regardless of the actions or delays of other threads.
What is livelock a kind of?
Livelock is a kind of concurrency bug. A concurrency bug is a software defect in which overlapping operations interact to produce unintended or incorrect behavior.
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.


