Documentation
¶
Overview ¶
Package workgroup contains a concurrency-control utility.
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
}
Group is a basic concurrency-control mechanism that has a variable-sized pool of worker goroutines executing callbacks from a queue. Unlike an [errgroup.Group], this types does not allow awaiting on outcomes of callbacks.
A Group is safe to call from multiple goroutines. A Group should not be copied once created.
func WithSize ¶
WithSize returns a Group that will execute with up to the requested number of goroutines and queue up to the requested number of work elements.
Click to show internal directories.
Click to hide internal directories.