worker

package
v1.0.17 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: Apache-2.0 Imports: 4 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 is the worker pool

func New

func New(size int, enableLog bool) *Pool

func NewWithDepth added in v1.0.8

func NewWithDepth(size, depth int, enableLog bool) *Pool

func (*Pool) Add

func (p *Pool) Add(job func())

func (*Pool) AddWithDepth added in v1.0.8

func (p *Pool) AddWithDepth(depth int, job func())

func (*Pool) Close

func (p *Pool) Close()

Close closes all workers

func (*Pool) Run

func (p *Pool) Run()

Run runs all jobs with worker pool

Jump to

Keyboard shortcuts

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