import "go.gazette.dev/core/task"
type Group struct {
// contains filtered or unexported fields
}
Group is a group of tasks which should each be executed concurrently, and which should be collectively blocked on until all are complete. Tasks should be preemptable, and the first task to return a non-nil error cancels the entire Group. While Group is used to invoke and wait on multiple goroutines, it is not itself thread-safe.
NewGroup returns a new, empty Group with the given Context.
Cancel the Group Context.
Context returns the Group Context.
GoRun all queued functions. GoRun may be called only once: the second invocation will panic.
Queue a function for execution with the Group. Cannot be called after GoRun is invoked or Queue panics.
Wait for started functions, returning only after all complete. The first encountered non-nil error is returned. GoRun must have been called or Wait panics.
Package task imports 4 packages (graph) and is imported by 25 packages. Updated 2020-08-25. Refresh now. Tools for package owners.