Green Thread
ELI5 — The Vibe Check
Green threads are fake threads managed by your programming language instead of the operating system. They're super lightweight — you can have millions of them. Go calls them goroutines, Erlang calls them processes, and they all pretend to be doing everything at once.
Real Talk
User-space threads scheduled by the language runtime rather than the OS kernel. Green threads are extremely lightweight (often just a few KB of stack), can number in the millions, and use cooperative or M:N scheduling. Examples include goroutines (Go), Erlang processes (BEAM), and Java virtual threads (Project Loom).
When You'll Hear This
"Go can handle a million goroutines because they're green threads, not OS threads." / "Green threads let you write concurrent code that scales to millions of connections on a single machine."
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...
Coroutine
A coroutine is a function that can pause itself, let other things run, then resume right where it left off.
Thread
A thread is a mini-worker inside your program that can run tasks independently.