Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WorkerPool ¶
type WorkerPool struct { ShowProgress bool ShowSpeed bool // contains filtered or unexported fields }
WorkerPool represents pool of workers.
func New ¶
func New(threadCount int) *WorkerPool
New creates new pool of workers with specified goroutine count. If specified number of workers less than 1, runtime.NumCPU() is used.
func (*WorkerPool) Add ¶
func (workerPool *WorkerPool) Add(f func() error)
Add sends specified task for execution.
func (*WorkerPool) CloseAndWait ¶
func (workerPool *WorkerPool) CloseAndWait()
CloseAndWait stops accepting tasks and waits for all tasks to complete.
func (*WorkerPool) ErrorCount ¶ added in v0.1.1
func (workerPool *WorkerPool) ErrorCount() int
ErrorCount returns total error count.
func (*WorkerPool) SetEstimateCount ¶ added in v0.1.9
func (workerPool *WorkerPool) SetEstimateCount(n int)
Click to show internal directories.
Click to hide internal directories.