3 ms·
Check out the Context API, it's a standardization of several cancellation approaches.
by politician 10y ago
Check out the Context API, it's a standardization of several cancellation approaches.
- deleted 10y ago[deleted]
- lclarkmichalek 10y agoAnd x/sync/errgroup if you want the lovechild of context and WaitGroup
- Matthias247 10y agoThose two go hand in hand. Even if you you context (or a bare channel) for signaling the cancellation you often want to wait until the cancellation really happened and the child task terminated. For this task WaitGroup is the easiest thing to use.