workerpool

package
v0.0.0-...-41e44c1 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WorkerPool

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

WorkerPool is a wrapper around workerpool.WorkerPool to provide it with some much needed improvements. These are: 1. allow for workers to return errors so we don't need to introduce channels to all code using workerpools. 2. catch panics inside workers and return them as errors.

func New

func New(maxWorkers int) *WorkerPool

func (*WorkerPool) Submit

func (wp *WorkerPool) Submit(fn func() error)

func (*WorkerPool) Wait

func (wp *WorkerPool) Wait() error

Jump to

Keyboard shortcuts

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