concurrent

package
v2.2.5 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FireAndForget

func FireAndForget(maxConcurrent uint, action Action) chan<- interface{}

FireAndForget run concurrent action without taking care of output

func Run

func Run(maxConcurrent uint, action Action, onSuccess func(interface{}), onError func(error)) chan<- interface{}

Run create a pool of goroutines for executing action with concurrency limits (default to NumCPU)

Types

type Action

type Action func(interface{}) (interface{}, error)

Action defines a concurrent action with takes input and return output or error

Jump to

Keyboard shortcuts

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