Deadlock
ELI5 — The Vibe Check
A deadlock is when two things are each waiting for the other to go first, and neither ever does. Thread A holds Lock 1 and wants Lock 2. Thread B holds Lock 2 and wants Lock 1. Everyone is politely waiting forever. The program freezes.
Real Talk
A deadlock occurs when two or more threads are each waiting for a resource held by the other, creating a circular dependency that causes all involved threads to block indefinitely. Preventing deadlocks requires careful lock ordering, timeouts, or lock-free data structures.
When You'll Hear This
"The server froze — turned out to be a deadlock between two database transactions." / "Avoid holding multiple locks simultaneously to prevent deadlocks."
Related Terms
Async
Async means 'don't wait around'. You order food at a restaurant, then chat with friends instead of standing at the kitchen window staring.
Concurrency
Concurrency is juggling multiple tasks at once — not necessarily at the exact same instant, but switching between them fast enough that they all seem to be...
Process
A process is a full running program with its own isolated chunk of memory.
Race Condition
A race condition is when two parts of your code are racing to do something at the same time and the winner isn't guaranteed — leading to unexpected, hard-t...
Thread
A thread is a mini-worker inside your program that can run tasks independently.