Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Job ¶
type Job struct { JobID interface{} JobFunc func() (interface{}, error) }
Represents user request, function which should be executed in some worker.
type Pool ¶
type Pool struct { JobQueue chan Job Jobresult chan Jobresult // contains filtered or unexported fields }
func NewPool ¶
Will make pool of gorouting workers. numWorkers - how many workers will be created for this pool queueLen - how many jobs can we accept until we block
Returned object contains JobQueue reference, which you can use to send job to pool.
Click to show internal directories.
Click to hide internal directories.