worker_pool

package
v1.6.11 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 7 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 {
	IsAborted bool
	// contains filtered or unexported fields
}

func New

func New(numWorkers, numTasks int, forceNotTerminal bool) *Pool

func (*Pool) Add

func (pool *Pool) Add(task Task)

func (*Pool) Start

func (pool *Pool) Start()

func (*Pool) Wait

func (pool *Pool) Wait() <-chan struct{}

type Task

type Task interface {
	Run(send func(string), abort func())
}

Jump to

Keyboard shortcuts

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