worker

package
v0.29.4-dev-56e4e32 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2025 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pool

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

Pool manages a pool of worker goroutines.

func NewPool

func NewPool(numWorkers int) *Pool

NewPool creates a new Pool with a specified number of workers.

func (*Pool) Stop

func (p *Pool) Stop()

Stop stops all the workers and waits for them to finish.

func (*Pool) Submit

func (p *Pool) Submit(task Task)

Submit adds a task to the worker pool.

type Task

type Task func()

Task represents a unit of work to be processed by the worker pool.

Jump to

Keyboard shortcuts

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