parallel

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MIT, Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(tasks []types.FuncReturnErr) error

func RunIgnoreError added in v0.3.0

func RunIgnoreError(tasks []types.FuncReturnErr) error

func RunReturnData added in v0.3.0

func RunReturnData[T any](tasks []types.FuncReturnDataOrErr[T]) ([]T, error)

Types

type Option added in v0.0.45

type Option func(p *Parallel)

type Parallel

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

func New

func New(workNum uint, opts ...Option) *Parallel

func (*Parallel) AddFunc added in v0.3.0

func (p *Parallel) AddFunc(task types.FuncRetry)

func (*Parallel) AddTask

func (p *Parallel) AddTask(task interfaces.TaskRetry)

func (*Parallel) Stop added in v0.0.45

func (p *Parallel) Stop()

func (*Parallel) Wait

func (p *Parallel) Wait()

type TaskChain added in v0.3.0

type TaskChain []func() error

func (*TaskChain) Do added in v0.3.0

func (t *TaskChain) Do(times uint) bool

Jump to

Keyboard shortcuts

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