workerpool

package
v0.0.0-...-4355fa8 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HandlerGetter

type HandlerGetter interface {
	Get(taskType string) (task.Handler, bool)
}

type Pool

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

func New

func New(numWorkers int) *Pool

func (*Pool) AwaitShutdown

func (wp *Pool) AwaitShutdown()

func (*Pool) Start

func (wp *Pool) Start(
	ctx context.Context,
	taskQueue task.Dequeuer[task.Task],
	results task.Submitter[task.Result],
	taskHandlers HandlerGetter,
)

Jump to

Keyboard shortcuts

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