Go Snippet
Context-Driven Cancellation
Difficulty: Medium
`context.Context` is Go's standard mechanism for cancelling long-running operations: a deadline, a parent-child cancellation tree, and a request-scoped value bag. This snippet shows `context.WithTimeout` to bound a function's runtime, the `select { case <-ctx.Done(): ... }` pattern in workers, and how to attach a request-id value. Pass `ctx` as the first argument to every function that does I/O or has a chance of blocking.
