🎉 October Learning Month — learn a new software term every day!
An interactive flashcard trainer for software engineering terms.

Deadlock

In plain terms

A standstill where tasks each wait forever for a resource the other holds.

Going deeper

Two or more threads block permanently because each is holding something the other needs and neither will release. It's a classic concurrency hazard, avoided by ordering resource acquisition or using timeouts.

Under the hood

Requires four Coffman conditions simultaneously (mutual exclusion, hold-and-wait, no preemption, circular wait); prevented by lock ordering, timeouts, or try-lock patterns.

Examples

Two threads each holding one of two locks; database transactions locking rows in opposite order.

Think of it like...

Like two cars meeting on a one-lane bridge, each refusing to back up so the other can pass: both sit there forever.

Feedback & Bug Report