parallel

package
v1.3.13 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2025 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

func RunIgnoreError(tasks []types.FuncReturnErr) error

func RunReturnData

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

Types

type Option

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

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

func (*Parallel) AddTask

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

func (*Parallel) Stop

func (p *Parallel) Stop()

func (*Parallel) Wait

func (p *Parallel) Wait()

type TaskChain

type TaskChain []func() error

func (*TaskChain) Do

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