pool

package
v0.0.0-...-1a65c5d Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: MIT Imports: 3 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 interface {
	Run(ctx context.Context)
}

type Task

type Task interface {
	Execute(ctx context.Context)
}

type WorkPool

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

func NewWorkPool

func NewWorkPool(maxWorkers int) *WorkPool

func (*WorkPool) AddTask

func (p *WorkPool) AddTask(task Task)

func (*WorkPool) Run

func (p *WorkPool) Run(ctx context.Context)

Jump to

Keyboard shortcuts

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