Documentation ¶
Overview ¶
*****************************************************************************
* * Description : * A very basic and naive implementation of thread pool. * ****************************************************************************
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoRoutinePool ¶
type GoRoutinePool struct {
// contains filtered or unexported fields
}
func NewGoRoutinePool ¶
func NewGoRoutinePool(numWorkers int) *GoRoutinePool
NewGoRoutinePool allocates a new thread pool with `numWorkers` goroutines.
func (*GoRoutinePool) Schedule ¶
func (p *GoRoutinePool) Schedule(task Task)
Schedule enqueus a closure to run on the GoRoutinePool's goroutines.
func (*GoRoutinePool) Stop ¶
func (p *GoRoutinePool) Stop()
Stop sends a stop signal to all running goroutines.
Click to show internal directories.
Click to hide internal directories.