xgo

package
v1.0.1-0...-e52dcc8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Go

func Go(fn func())

Go goroutine 开启一个goroutine

func ParallelWithError

func ParallelWithError(fns ...func() error) func() error

ParallelWithError ...

func ParallelWithErrorChan

func ParallelWithErrorChan(fns ...func() error) chan error

ParallelWithErrorChan calls the passed functions in a goroutine, returns a chan of errors. fns会并发执行,chan error

func RestrictParallelWithErrorChan

func RestrictParallelWithErrorChan(concurrency int, fns ...func() error) chan error

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

func SerialUntilError(fns ...func() error) func() error

创建一个迭代器

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL