Documentation
¶
Index ¶
- func Any(fn Task, max int) error
- func EnhancedParallel(opt Option) error
- func Parallel(fn Task, max int, limit ...int) error
- func ParallelLock(fn LockTask, max int, limit ...int) error
- func Race(tasks ...RaceTask) error
- func RaceSucceed(tasks ...RaceTask) error
- func Some(fn Task, max, count int) error
- type Errors
- type LockTask
- type Option
- type RaceTask
- type Task
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Any ¶ added in v0.2.0
Any runs task function, if one task is success, it will return nil, otherwise returns error.
func EnhancedParallel ¶ added in v0.1.0
EnhancedParallel runs the task function parallel
func ParallelLock ¶ added in v0.4.0
ParallelLock runs lock task function parallel
func RaceSucceed ¶ added in v0.5.0
RaceSucceed runs task function race, it's done when one task has been successful or all task done.
Types ¶
Click to show internal directories.
Click to hide internal directories.