Documentation
¶
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 is a collection of goroutines working on subtasks that are part of the same overall task. A zero Group is valid and does not cancel on error.
func WithCancel ¶
WithCancel create a new Group and an associated Context derived from ctx. given function from Go will receive context derived from this ctx, The derived Context is canceled the first time a function passed to Go returns a non-nil error or the first time Wait returns, whichever occurs first.
func WithContext ¶
WithContext create a Group. given function from Go will receive this context,
func WithTimeout ¶ added in v1.0.27
WithTimeout create a new Group and an associated Context derived from ctx. given function from Go will receive context derived from this ctx, The derived Context is canceled when the timeout expires
func (*Group) Go ¶
Go calls the given function in a new goroutine. The first call to return a non-nil error cancels the group; its error will be returned by Wait.