Documentation ¶
Overview ¶
This package creates a very simple pool of goroutines. Sometimes a channel is not appropriate. There are probably more efficient ways of implementing this, but it is simple and works well.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
func (*Pool) Done ¶
func (p *Pool) Done()
Done is called by worker goroutines to signify they are quitting
func (*Pool) IsFull ¶
IsFull returns true if the number of worker threads is greater than or equal to its capacity
func (*Pool) IsQuitting ¶
func (*Pool) SetCapacity ¶
SetCapacity adjusts the capacity of the Pool. If set lower than the current number of workers, calls to Add will return 0 until the number of workes becomes less than the capacity
Click to show internal directories.
Click to hide internal directories.