Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Awaiter ¶
type Awaiter interface {
// AwaitSync blocks until all routines started with "Go"
// are finished (same as WaitGroup.Wait)
AwaitSync()
// Go executes "impl" in a goroutine and increments
// the internal WaitGroup counter by one
Go(impl func())
// Cancel signals the executed goroutines to cancel
// their execution.
// After Cancel was called, IsCancelRequested returns true and the channel
// returned by CancelRequested is closed
Cancel()
// IsCancelRequested returns true if Cancel was called
IsCancelRequested() bool
// CancelRequested returns a channel than never provides data
// but will be closed when Cancel was called
CancelRequested() <-chan interface{}
}
Awaiter is similar to a WaitGroup but simplifies the resource handling
Click to show internal directories.
Click to hide internal directories.