errpool

command module
v0.0.0-...-37aa2ca Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2018 License: MIT Imports: 4 Imported by: 0

README

errpool

Like sync.errgroup but with limited concurrency

Like errgroup, errpool provides synchronization, error propagation, and Context cancelation for groups of goroutines working on subtasks of a common task.

Unlike errgroup, errpool limits the number of concurrent goroutines to a specified max concurrency—much like the thread/process/coroutine pools found in other languages' standard libraries (although with an errgroup-like API, rather than the more powerful APIs provided by languages like, e.g., C# or Python).

type Pool

func WithContext(ctx context.Context, maxTasks int) (*Pool, context.Context) func (p *Pool) Go(f func() error) func (p *Pool) Wait() error

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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