concurrent

package
v4.41.6 Latest Latest
Warning

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

Go to latest
Published: May 14, 2022 License: MIT Imports: 2 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FailFast added in v4.30.4

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

FailFast describes a task group with a fail-fast approach

func NewFailFast added in v4.30.4

func NewFailFast(limit uint64) *FailFast

NewFailFast creates a Group with given concurrency limit

func (*FailFast) Go added in v4.30.4

func (g *FailFast) Go(f func() error)

Go run given function in a goroutine according to limiter and current status

func (*FailFast) Wait added in v4.30.4

func (g *FailFast) Wait() error

Wait for Group to end

func (*FailFast) WithContext added in v4.30.4

func (g *FailFast) WithContext(ctx context.Context) context.Context

WithContext make the given context cancelable for the group

type Limited added in v4.30.4

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

Limited describes a task group with limited parallelism

func NewLimited added in v4.30.4

func NewLimited(limit uint64) *Limited

NewLimited creates a Limited with given concurrency limit

func (*Limited) Go added in v4.30.4

func (g *Limited) Go(f func())

Go run given function in a goroutine according to limiter

func (*Limited) Wait added in v4.30.4

func (g *Limited) Wait()

Wait for Limited to end

type Simple added in v4.33.0

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

Simple describes a task group with simple parallelism

func NewSimple added in v4.33.0

func NewSimple() *Simple

NewSimple creates a Simple concurrent pattern

func (*Simple) Go added in v4.33.0

func (g *Simple) Go(f func())

Go run given function in a goroutine

func (*Simple) Wait added in v4.33.0

func (g *Simple) Wait()

Wait for Simple to end

Jump to

Keyboard shortcuts

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