Thread
ELI5 — The Vibe Check
A thread is a mini-worker inside your program that can run tasks independently. Your app can have multiple threads running at the same time — one loading data, one updating the UI — sharing the same memory space like roommates in an apartment.
Real Talk
A thread is the smallest unit of execution within a process. Multiple threads share the same process memory, enabling concurrent execution. Threads are lightweight but require synchronisation mechanisms (locks, mutexes) to avoid race conditions.
When You'll Hear This
"Spawn a background thread for the file upload so the UI stays responsive." / "Thread safety is why we use mutexes around that shared resource."
Related Terms
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...
Deadlock
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.
Parallelism
Parallelism is doing multiple things at literally the exact same time — two chefs cooking two dishes simultaneously.
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...