Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultCleanIntervalTime is the interval time to clean up goroutines. DefaultCleanIntervalTime = 5 * time.Second // OPENED represents that the pool is opened. OPENED = iota // CLOSED represents that the pool is closed. CLOSED )
Variables ¶
View Source
var ( // ErrPoolClosed will be returned when submitting task to a closed pool. ErrPoolClosed = errors.New("this pool has been closed") // ErrPoolOverload will be returned when the pool is full and no workers available. ErrPoolOverload = errors.New("too many goroutines blocked on submit or Nonblocking is set") // ErrProducerClosed will be returned when the producer is closed. ErrProducerClosed = errors.New("this producer has been closed") )
Functions ¶
Types ¶
type BasePool ¶
type BasePool struct {
// contains filtered or unexported fields
}
BasePool is base class of pool
func (*BasePool) LastTunerTs ¶
LastTunerTs returns the last time when the pool was tuned.
func (*BasePool) SetLastTuneTs ¶
SetLastTuneTs sets the last time when the pool was tuned.
Click to show internal directories.
Click to hide internal directories.