Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrPoolOpened occurs when pool have been opened // twice ErrPoolOpened = errors.New("pool have been opened") )
Functions ¶
This section is empty.
Types ¶
type SlavePool ¶
SlavePool object
func MakePool ¶
MakePool creates a pool and initialise Slaves num is the number of Slaves work is the function to execute in the Slaves after the function to execute after execution of work
func (*SlavePool) Close ¶
func (sp *SlavePool) Close()
Close closes the pool waiting the end of all jobs
func (*SlavePool) SendWork ¶
func (sp *SlavePool) SendWork(job interface{})
SendWork Send work to the pool. This function get the slave with less number of works and send him the job
func (*SlavePool) WorkQueueLen ¶
Click to show internal directories.
Click to hide internal directories.