Documentation ¶
Overview ¶
Package quit contains a global shutdown channel that can be used to broadcast a shutdown event to all goroutines that are currently running.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BroadcastShutdown ¶
func BroadcastShutdown()
BroadcastShutdown broadcasts a message to all goroutines that are subscribing to the quit channel. This works because a channel close works like a message broadcast on all listeners subscribed to the channel. Ideally we can send a message normally, but in go message sends to channels always work in a fan-out fashion. That is, only one listener can get the message instead of all.
func GetQuitChannel ¶
func GetQuitChannel() chan struct{}
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.