Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
This is a rather complex package to understand.
Not intuitive.
Here it is very well described, with extended comments - and why at all:
https://habrahabr.ru/post/269299/
Type your question into Google, it helps.
Reading the documentation is sometimes helpful, you know?
https://godoc.org/golang.org/x/net/context
https://blog.golang.org/context
Here is a good translation: poetofcode.ru/2016/01/09/patternyu-parallelizma-v-...
This is a type of container or buffer for storing intermediate data.
The built-in Go server processes requests in parallel. Therefore, for example, variables external to a function can be used simultaneously by several threads. If there is a chain of functions, then it is necessary to pass data as an argument, which is inconvenient.
Frameworks offer their own contexts (containers), now since version 1.7 the context is available in the standard library.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question