typeover
curriculum

Curriculum Idioms & ecosystem Context exercise 6 · fill-line

Context


About this theme

context.Context propagates cancellation, deadlines, and request-scoped values across goroutines and API boundaries. By convention, the first argument of any function that does I/O or starts a goroutine is ctx context.Context. Listening for <-ctx.Done() is how you write cancellable work.