pool

package
v1.0.29 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RUNNING = 1
	STOPPED = 0
)

Variables

View Source
var ErrInvalidPoolCap = errors.New("invalid pool cap")
View Source
var ErrPoolAlreadyClosed = errors.New("pool already closed")

Functions

This section is empty.

Types

type Pool

type Pool struct {
	PanicHandler func(interface{})
	// contains filtered or unexported fields
}

func NewPool

func NewPool(capacity uint64) (*Pool, error)

func (*Pool) Close

func (p *Pool) Close()

func (*Pool) GetCap

func (p *Pool) GetCap() uint64

func (*Pool) GetRunningWorkers

func (p *Pool) GetRunningWorkers() uint64

func (*Pool) Put

func (p *Pool) Put(task Task) error

type Task

type Task interface {
	Handler()
}

Jump to

Keyboard shortcuts

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