parallel

package
v0.0.0-...-5c12a10 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrLimiterClosed = errors.New("limiter closed")
	ErrNegativeCount = errors.New("negative count")
)

Functions

This section is empty.

Types

type Parallel

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

func NewParallel

func NewParallel(ctx context.Context, limit int32) *Parallel

func (*Parallel) AddParallelism

func (l *Parallel) AddParallelism(limit int32)

func (*Parallel) Close

func (l *Parallel) Close()

func (*Parallel) CurrentLimit

func (l *Parallel) CurrentLimit() int32

func (*Parallel) Do

func (l *Parallel) Do(f func(context.Context)) error

func (*Parallel) SetParallelism

func (l *Parallel) SetParallelism(limit int32)

func (*Parallel) Wait

func (l *Parallel) Wait()

Jump to

Keyboard shortcuts

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