to modify a context is to derive a sub-context Hierarchical: operations on a high-level context trickle down to derived contexts Standard glue between various APIs, or candidate for such
complexity caused by nesting Go APIs haven't traditionally given much thought to graceful shutdown Context promotes cancellation awareness, thanks to the common API Benefits architecture of non-trivial apps which are not expected to run forever
transparently Strong decoupling thanks to lexically scoped keys Solves similar problems as thread-local storage Request-scoped storage Not specific to a thread or a goroutine
or cancellation A channel may be read concurrently A closed channel may be read repeatedly Context.Deadline() value may be used with readers/writers, but it doesn't respect cancellation