signal

package
v1.24.4 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2016 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CancelSignal

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

func NewCloseSignal() *CancelSignal

NewCloseSignal creates a new CancelSignal.

func (*CancelSignal) Cancel

func (this *CancelSignal) Cancel()

Cancel signals the goroutine to stop.

func (*CancelSignal) Done

func (this *CancelSignal) Done()

Done signals the caller that the goroutine has completely finished.

func (*CancelSignal) WaitForCancel

func (this *CancelSignal) WaitForCancel() <-chan struct{}

WaitForCancel should be monitored by the goroutine for when to stop.

func (*CancelSignal) WaitForDone

func (this *CancelSignal) WaitForDone() <-chan struct{}

WaitForDone is used by caller to wait for the goroutine finishes.

type Once

type Once struct {
	// contains filtered or unexported fields
}

func (*Once) Do

func (o *Once) Do(f func())

func (*Once) Reset

func (o *Once) Reset()

Jump to

Keyboard shortcuts

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