4 ms·
Implicit shared state? Exactly the thing to enjoy in a highly concurrent environment! At least I hope that a context can be immutable throughout. I only see on
by nine_k 2y ago
Implicit shared state? Exactly the thing to enjoy in a highly concurrent environment!
At least I hope that a context can be immutable throughout. I only see one variable in the documentation of the context package. Extending it with mutable fields, and mutating them to pass data between functions, would be something I'd never approve in a code review.
- cyberax 2y agoThe context itself is immutable, it's essentially a linked list (or actually a tree). If you need to "mutate" it, you create a new segment that links to a previous segment.