Quit Channel
Learn how to stop a goroutine.
We'll cover the following...
Overview of the Quit
channel
One goroutine can’t forcibly stop another. A goroutine can stop only by returning from its top-level function. We can’t kill a goroutine from outside. We can signal to a goroutine to stop using a channel. For example, suppose our goroutine looks like the following:
ch := make(chan string, 10)
go func(){
for {
ch <- do_stuff()
}
}()
The ...