Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrSkipTask = errors.New("skip the task")
Functions ¶
func NewWorkPool ¶
func NewWorkPool(size int) *workPool
NewWorkPool creates a new worker pool which has "size" numbers of workers.
Types ¶
type ResultHandler ¶
type ResultHandler func(interface{}) error
type WorkPool ¶
type WorkPool interface { Run(ResultHandler) Done() error AddTask(task) bool }
Click to show internal directories.
Click to hide internal directories.