warming up your workspace

Deadlock

Applies to: general

A deadlock is when two or more threads each wait forever for a resource the other holds, so none can proceed. It is commonly avoided by always acquiring locks in the same order.

T1 holds A, wants B    T2 holds B, wants A    -> stuck

See also: mutex, thread