worker

package
v2.3.9 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WorkerJob

type WorkerJob interface {
	Execute() (any, error)
}

type WorkerPool

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

func NewWorkerPool

func NewWorkerPool(numWorkers, queueSize int) *WorkerPool

func NewWorkerPoolWithResultsAndErrors

func NewWorkerPoolWithResultsAndErrors(numWorkers, queueSize int) *WorkerPool

func (*WorkerPool) Errorz

func (p *WorkerPool) Errorz() <-chan error

func (*WorkerPool) ErrorzDone

func (p *WorkerPool) ErrorzDone()

func (*WorkerPool) ErrorzReady

func (p *WorkerPool) ErrorzReady()

func (*WorkerPool) Finish

func (p *WorkerPool) Finish()

func (*WorkerPool) Queue

func (p *WorkerPool) Queue() chan<- WorkerJob

func (*WorkerPool) QueueIgnore

func (p *WorkerPool) QueueIgnore(j WorkerJob)

func (*WorkerPool) Results

func (p *WorkerPool) Results() <-chan any

func (*WorkerPool) ResultsDone

func (p *WorkerPool) ResultsDone()

func (*WorkerPool) ResultsReady

func (p *WorkerPool) ResultsReady()

func (*WorkerPool) Start

func (p *WorkerPool) Start()

func (*WorkerPool) StartAndWait

func (p *WorkerPool) StartAndWait()

func (*WorkerPool) Wait

func (p *WorkerPool) Wait()

Jump to

Keyboard shortcuts

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