Documentation ¶
Overview ¶
Package wait provides Group, an extended version of sync.WaitGroup.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
A Group waits for a collection of goroutines to exit. With Wait, one may wait for all goroutines to exit and get the first error that was seen. Cooperative cancellation is also supported via Quit and the broadcast chan passed to each goroutine. The zero value of Group is ready to be used.
func (*Group) Go ¶
Go runs f in a new goroutine. The quit chan is closed to indicate that f should exit early, so f is expected to periodically receive from quit and immediately return nil if a value arrives. Quit is called automatically if f returns a non-nil error.
Click to show internal directories.
Click to hide internal directories.