Use channels to stop goroutines