Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Job ¶
type Job interface { Execute() // Description is used to provide a summary of this job (used mainly for logging purposes) Description() string }
Job represents a task that can be executed by a goroutine pool. Errors in execution should be logged but not returned, there is no retry mechanism in place.
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Pool represents a thread pool that distributes jobs
func CreateThreadPool ¶
CreateThreadPool instantiates a thread pool with the given number of workers and a job buffer with the given length
Click to show internal directories.
Click to hide internal directories.