Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrJobPool = errors.New("job pool error")
Functions ¶
This section is empty.
Types ¶
type JobPool ¶
JobPool runs a sequence of tasks concurrently.
func NewJobPool ¶
func NewJobPool[IN any, OUT any](jobCount, maxConsumers int, consumer Consumer[IN, OUT]) *JobPool[IN, OUT]
NewJobPool creates a new JobPool.
If jobCount is zero, the number of jobs is unbounded. The number of consumers is the minimum of maxWorkers and jobCount.
Click to show internal directories.
Click to hide internal directories.