quit

package
v0.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2023 License: MPL-2.0 Imports: 1 Imported by: 0

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{}

func GetWaiter

func GetWaiter() *sync.WaitGroup

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL