Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WorkerPool ¶
type WorkerPool struct {
// contains filtered or unexported fields
}
WorkerPool is a wrapper around workerpool.WorkerPool to provide it with some much needed improvements. These are: 1. allow for workers to return errors so we don't need to introduce channels to all code using workerpools. 2. catch panics inside workers and return them as errors.
func New ¶
func New(maxWorkers int) *WorkerPool
func (*WorkerPool) Submit ¶
func (wp *WorkerPool) Submit(fn func() error)
func (*WorkerPool) Wait ¶
func (wp *WorkerPool) Wait() error
Click to show internal directories.
Click to hide internal directories.