GeistHaus
log in · sign up

Contextualizing the Go Context API: Program Scopes

matttproud.com

The context API is a critical foundation for modern Go development. This is especially the case with APIs that use concurrency under the hood or perform distributed operations. Given this, I would like to do a deep dive on several topics around the context API. I expect this post to be the first of several. In this one, I cover contexts and program scopes. Program scope and contexts sound like a mundane topic, but a fair bit of confusion arises with contexts in industry. The most recent example I saw was this post on Reddit: Should contexts be used for long-running operations?

1 page links to this URL