Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunForever ¶
RunForever will execute the given task repeatedly on a set number of goroutines and return any errors. Context can be used to cancel execution of additional tasks.
func RunLimited ¶
RunLimited will execute the given task a set number of times on a set number of goroutines and return any errors. Total times the task will be executed is equal to concurrent multiplied by count. Context can be used to cancel execution of additional tasks.
Types ¶
type TaskPool ¶
type TaskPool struct {
// contains filtered or unexported fields
}
TaskPool limits the number of concurrent tasks being processed to a given max.
func NewTaskPool ¶
NewTaskPool creates a new task pool that will limit concurrent tasks to max.
Click to show internal directories.
Click to hide internal directories.