Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WorkerPool ¶
func WorkerPool(n int, w WorkerFunc) (waitFunc func())
WorkerPool starts a pool of n workers each running the WorkerFunc w.
Returns a function waitFunc, that when called waits for all workers to finish.
Types ¶
type WorkerFunc ¶
type WorkerFunc func(worker int)
WorkerFunc implements a function that can be used in a WorkerPool.
worker is a unique integer identifying the worker, starting at 0.
Click to show internal directories.
Click to hide internal directories.