Documentation
¶
Index ¶
- type WorkerPool
- func (t *WorkerPool) GetPendingItemCount() int
- func (t *WorkerPool) GetQSize() int
- func (t *WorkerPool) Idle() bool
- func (t *WorkerPool) PushItem(a interface{})
- func (t *WorkerPool) SetHandler(fn func(interface{}))
- func (t *WorkerPool) SetMaxGoroutine(nMaxCount int)
- func (t *WorkerPool) SetMaxIdleGoroutine(nMaxCount int)
- func (t *WorkerPool) SetMaxIdleTime(d time.Duration)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WorkerPool ¶
type WorkerPool struct {
// contains filtered or unexported fields
}
func NewWorkerPool ¶
func NewWorkerPool(channelsize int) *WorkerPool
func (*WorkerPool) GetPendingItemCount ¶
func (t *WorkerPool) GetPendingItemCount() int
已经投入队列,未处理完成的任务数量
func (*WorkerPool) GetQSize ¶
func (t *WorkerPool) GetQSize() int
func (*WorkerPool) Idle ¶
func (t *WorkerPool) Idle() bool
func (*WorkerPool) PushItem ¶
func (t *WorkerPool) PushItem(a interface{})
func (*WorkerPool) SetHandler ¶
func (t *WorkerPool) SetHandler(fn func(interface{}))
func (*WorkerPool) SetMaxGoroutine ¶
func (t *WorkerPool) SetMaxGoroutine(nMaxCount int)
func (*WorkerPool) SetMaxIdleGoroutine ¶
func (t *WorkerPool) SetMaxIdleGoroutine(nMaxCount int)
func (*WorkerPool) SetMaxIdleTime ¶
func (t *WorkerPool) SetMaxIdleTime(d time.Duration)
Click to show internal directories.
Click to hide internal directories.