Versions in this module Expand all Collapse all v0 v0.1.4 Jun 11, 2021 Changes in this version + var ErrJobNotFunc = errors.New("generic worker not given a func()") + var ErrJobTimedOut = errors.New("job request timed out") + var ErrPoolNotRunning = errors.New("the pool is not running") + var ErrWorkerClosed = errors.New("worker was closed") + type Pool struct + func New(n int, ctor func() Worker) *Pool + func NewCallback(n int) *Pool + func NewFunc(n int, f func(interface{}) interface{}) *Pool + func (p *Pool) Close() + func (p *Pool) GetSize() int + func (p *Pool) Process(payload interface{}) interface{} + func (p *Pool) ProcessCtx(ctx context.Context, payload interface{}) (interface{}, error) + func (p *Pool) ProcessTimed(payload interface{}, timeout time.Duration) (interface{}, error) + func (p *Pool) QueueLength() int64 + func (p *Pool) SetSize(n int) + type Worker interface + BlockUntilReady func() + Interrupt func() + Process func(interface{}) interface{} + Terminate func()