← Back to /go/

Goroutines and channels — the Go concurrency model explained_

Go's concurrency model is simple in principle and powerful in practice. Here is how to think about it.

By: dave_runtime Apr 03, 2026 5 posts
#5 Apr 07

context.Context for Cancellation

The context package is how you propagate cancellation and deadlines through a goroutine tree. Every long-running function should accept a context.Context as its first parameter. When the context is cancelled, the function should stop and return. This is idiomatic Go.

By: dave_runtime Apr 07, 2026 18:39
[1] [2] Page 2 of 2 (5 posts)
5 posts in this thread [+] Reply