Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WorkerPool ¶
type WorkerPool struct { NumWorkers int // contains filtered or unexported fields }
WorkerPool represents a concurrent worker pool.
func NewWorkerPool ¶
func NewWorkerPool(numWorkers int) WorkerPool
NewWorkerPool constructs a new WorkerPool.
func (WorkerPool) Close ¶
func (p WorkerPool) Close()
func (WorkerPool) Schedule ¶
func (p WorkerPool) Schedule(job func())
Schedule schedules a job to be executed by a worker in the pool.
Click to show internal directories.
Click to hide internal directories.