Issues of Mutexes: Deadlocks

This lesson gives an overview of deadlocks caused by improper mutex locking in C++.

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?

Get hands-on with 1200+ tech skills courses.