Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckGoroutineErr ¶
Types ¶
type Job ¶
type Job func()
Job Represents user request, function which should be executed in some worker.
type Pool ¶
type Pool struct { JobQueue chan Job // contains filtered or unexported fields }
func NewPool ¶
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.
func (*Pool) JobDone ¶
func (p *Pool) JobDone()
JobDone In case you are using WaitAll fn, you should call this method every time your job is done.
If you are not using WaitAll then we assume you have your own way of synchronizing.
func (*Pool) SendJobWithDeadline ¶ added in v1.2.8
func (*Pool) SendJobWithTimeout ¶ added in v1.2.8
Click to show internal directories.
Click to hide internal directories.