Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttachPanicHandle ¶
func AttachPanicHandle(f func()) func()
func CheckGoroutineErr ¶
Types ¶
type Job ¶
type Job func()
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 ¶
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()
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) SendJobWithTimeout ¶
Click to show internal directories.
Click to hide internal directories.