AlgoMaster Logo

Done Channel Pattern

Last Updated: May 22, 2026

Medium Priority
9 min read

A done channel is a single channel passed to every goroutine that needs to know when to stop. Closing it broadcasts a "shut down now" signal to every listener at once. This is how Go code coordinated cancellation before context.Context existed, and it still works well when you don't need deadlines, values, or call-tree propagation.

Premium Content

Subscribe to unlock full access to this content and more premium articles.