Issues of Mutexes: Deadlocks
This lesson gives an overview of deadlocks caused by improper mutex locking in C++.
We'll cover the following
The issues with mutexes boil down to one main concern: deadlocks.
Deadlock
A deadlock is a state where two or more threads are blocked because each thread waits for the release of a resource before it releases its own resource.
The result of a deadlock is a total standstill. The thread that tries to acquire the resource - and usually the whole program - is blocked forever. It is easy to produce a deadlock. Curious? Let’s see how a deadlock occurs.
Get hands-on with 1400+ tech skills courses.