Documentation ¶
Index ¶
- func DelayGo(delay time.Duration, fn func())
- func Go(fn func())
- func GoDirect(fn interface{}, args ...interface{})
- func Parallel(fns ...func()) func()
- func ParallelWithError(fns ...func() error) func() error
- func ParallelWithErrorChan(fns ...func() error) chan error
- func RestrictParallel(restrict int, fns ...func()) func()
- func RestrictParallelWithErrorChan(concurrency int, fns ...func() error) chan error
- func SafeGo(fn func(), rec func(error))
- func Serial(fns ...func()) func()
- func SerialUntilError(fns ...func() error) func() error
- func SerialWhenError(we WhenError) func(fn ...func() error) func() error
- func SerialWithError(fns ...func() error) func() error
- type WhenError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParallelWithError ¶
ParallelWithError ...
func ParallelWithErrorChan ¶
ParallelWithErrorChan calls the passed functions in a goroutine, returns a chan of errors. fns会并发执行,chan error
func RestrictParallel ¶
func RestrictParallel(restrict int, fns ...func()) func()
RestrictParallel 并发,最大并发量restrict
func RestrictParallelWithErrorChan ¶
RestrictParallelWithErrorChan calls the passed functions in a goroutine, limiting the number of goroutines running at the same time, returns a chan of errors.
func SerialUntilError ¶
SerialUntilError 创建一个迭代器
func SerialWhenError ¶
SerialWhenError ...
Types ¶
Click to show internal directories.
Click to hide internal directories.