parallel

package
v1.2.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const NoLimit = 0

NoLimit means full parallelism mode.

Variables

This section is empty.

Functions

func Run

func Run(n, limit int, f func(i int) error) error

Run executes function f with arguments ranging from 0 to n-1 executing at most limit in parallel. If limit is 0 it runs f(0),f(1),...,f(n-1) in parallel.

Types

type ErrAbort

type ErrAbort struct {
	// contains filtered or unexported fields
}

ErrAbort is a special kind of error that aborts all further execution. Function calls that are in progress will continue to execute but no new functions will be called.

func Abort

func Abort(err error) ErrAbort

Abort is special kind of error that aborts all further execution.

Jump to

Keyboard shortcuts

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