Original post

One of the common use case in Go is to start a few goroutines to do some
work. These goroutines block listening in on a channel, waiting for more work to
arrive. At some point, you want to signal these goroutines to stop accepting
more work and exit, so you can cleanly shut down the program.