Last Updated: May 22, 2026
A goroutine isn't always running. Most of the time it's waiting, queued, or already finished. Knowing the stages it passes through, and what ends it, is what lets you reason about programs that have more than one thing happening at once. This lesson walks through the lifecycle, the three ways a goroutine can end, and the rule that costs most programs their first bug: when main returns, every other goroutine dies with it.