Skip to content

Green Thread

Spicy — senior dev territoryGeneral Dev

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."

Made with passive-aggressive love by manoga.digital. Powered by Claude.