Comment Comment by ricardobeat Strange to go all this length without mentioning the approaches that solve the problem in that first example:1. send a close message on the channel that stops the goroutine2. use a Context instance - `ctx.Done()` returns a channel you can select onBoth are quite easy to grasp and implement. parent ricardobeat 1 year ago
1. send a close message on the channel that stops the goroutine
2. use a Context instance - `ctx.Done()` returns a channel you can select on
Both are quite easy to grasp and implement.