Deadlocks, Liveness & Reentrant Locks
Explore the concepts of deadlocks, liveness, live-locks, starvation, and reentrant locks within Ruby concurrency. Understand how incorrect synchronization leads to common multithreading issues and learn to identify and prevent these problems.
We'll cover the following...
Deadlock and Liveness
Logical follies committed in multithreaded code, while trying to avoid race conditions and guarding critical sections, can lead to a host of subtle and hard to find bugs and side-effects. Some of these incorrect usage patterns have their specific names and are discussed below.
Deadlock
Deadlocks occur when two or more threads aren't able to make any progress because the resource required by the first thread is held by the second and the resource required by the second thread is held by the first.
Liveness
The ability of a program or an application to execute in a timely manner is called liveness. If a program ...