Help us shape the future of Go! Take the 2026 Go Developer Survey

parahelpers

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Runner added in v0.7.0

type Runner interface {
	Run(func() error)
	Wait() error
}

Runner wraps the lifecycle methods of a new task set.

Run will block until a worker is available or the context is cancelled, and then run the given func in a new goroutine. Wait will wait for all the running goroutines to finish.

type Workers added in v0.7.0

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

Workers configures a task executor with the most number of tasks to be executed in parallel.

func New added in v0.7.0

func New(numWorkers int) *Workers

New creates a new Workers with the given number of workers.

func (*Workers) Start added in v0.7.0

func (w *Workers) Start(ctx context.Context) (Runner, context.Context)

Start starts a new Runner.

Jump to

Keyboard shortcuts

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