Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CancelSignal ¶ added in v1.12.1
type CancelSignal struct {
// contains filtered or unexported fields
}
CancelSignal is a signal passed to goroutine, in order to cancel the goroutine on demand.
func NewCloseSignal ¶ added in v1.12.1
func NewCloseSignal() *CancelSignal
NewCloseSignal creates a new CancelSignal.
func (*CancelSignal) Cancel ¶ added in v1.12.1
func (this *CancelSignal) Cancel()
Cancel signals the goroutine to stop.
func (*CancelSignal) Done ¶ added in v1.12.1
func (this *CancelSignal) Done()
Done signals the caller that the goroutine has completely finished.
func (*CancelSignal) WaitForCancel ¶ added in v1.12.1
func (this *CancelSignal) WaitForCancel() <-chan struct{}
WaitForCancel should be monitored by the goroutine for when to stop.
func (*CancelSignal) WaitForDone ¶ added in v1.12.1
func (this *CancelSignal) WaitForDone() <-chan struct{}
WaitForDone is used by caller to wait for the goroutine finishes.
Click to show internal directories.
Click to hide internal directories.