Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrTooLessDone = errors.New("async: too less tasks/actions to completed without error")
)
Functions ¶
This section is empty.
Types ¶
type Awaiter ¶
type Awaiter interface { // Add add an action Add(action Action) // Wait wail for all actions to completed Wait(context.Context) ([]error, error) // WaitAny wait for any action to completed without error, can cancel other tasks WaitAny(context.Context) ([]error, error) // WaitN wait for N actions to completed without error WaitN(context.Context, int) ([]error, error) }
type Waiter ¶ added in v1.0.4
type Waiter[T any] interface { // Add add a task Add(task Task[T]) // Wait wail for all tasks to completed Wait(context.Context) ([]T, []error, error) // WaitAny wait for any task to completed without error, can cancel other tasks WaitAny(context.Context) (T, []error, error) // WaitN wait for N tasks to completed without error WaitN(context.Context, int) ([]T, []error, error) }
Click to show internal directories.
Click to hide internal directories.