concurrency

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pipe

func Pipe(ctx context.Context, in <-chan Chunk, out chan<- Chunk)

func RunGroup

func RunGroup(ctx context.Context, timeout time.Duration, fns ...func(ctx context.Context) error) error

Types

type Chunk

type Chunk struct {
	Data string
	Err  error
	Done bool
}

type Pool

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

func NewPool

func NewPool(ctx context.Context, maxConcurrent int) *Pool

func (*Pool) Stop

func (p *Pool) Stop()

func (*Pool) Submit

func (p *Pool) Submit(fn func(ctx context.Context) error) error

func (*Pool) Wait

func (p *Pool) Wait()

type Supervisor

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

func NewSupervisor

func NewSupervisor() *Supervisor

func (*Supervisor) ActiveCount

func (s *Supervisor) ActiveCount() map[string]int

func (*Supervisor) Go

func (s *Supervisor) Go(ctx context.Context, name string, fn func())

Jump to

Keyboard shortcuts

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