Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Picker ¶
type Picker[T any] struct { // contains filtered or unexported fields }
Picker provides synchronization, and Context cancelation for groups of goroutines working on subtasks of a common task. Inspired by errGroup
func WithContext ¶
WithContext returns a new Picker and an associated Context derived from ctx. and cancel when first element return.
func WithTimeout ¶
WithTimeout returns a new Picker and an associated Context derived from ctx with timeout.
func (*Picker[T]) Close ¶
Close cancels the picker context and releases resources associated with it. If Wait has been called, then there is no need to call Close.
Click to show internal directories.
Click to hide internal directories.