Documentation ¶
Index ¶
- func DisablePoolGlobal()
- func PoolGlobalLoadTotal() uint64
- func SetPoolGlobalMaxWorker(worker int)
- type Logic
- type Pool
- func (p *Pool) Close()
- func (p *Pool) NewSubPool(name string) *SubPool
- func (p *Pool) NewSubPoolWithFunc(name string, logic Logic) *SubPool
- func (p *Pool) SetAlways() *Pool
- func (p *Pool) SetDefLogic(logic Logic) *Pool
- func (p *Pool) SetTimeout(timeout time.Duration) *Pool
- func (p *Pool) SetWorker(worker int)
- func (p *Pool) Submit(i interface{})
- func (p *Pool) SubmitWait(i interface{})
- func (p *Pool) SubmitWithFunc(i interface{}, logic Logic)
- func (p *Pool) SubmitWithFuncWait(i interface{}, logic Logic)
- func (p *Pool) SubmitWithTimeout(i interface{}, timeout time.Duration)
- func (p *Pool) Wait()
- func (p *Pool) WaitChan() chan bool
- type Statistics
- type SubPool
- func (p *SubPool) Close()
- func (p *SubPool) LoadWaitCount() int64
- func (p *SubPool) SetLogic(logic Logic)
- func (p *SubPool) Submit(i interface{})
- func (p *SubPool) SubmitWait(i interface{})
- func (p *SubPool) SubmitWithFunc(i interface{}, logic Logic)
- func (p *SubPool) SubmitWithFuncWait(i interface{}, logic Logic)
- func (p *SubPool) Wait()
- type WorkPool
- func (p *WorkPool) Close()
- func (p *WorkPool) LoadTotal() uint64
- func (p *WorkPool) NewPool(name string, work int) *Pool
- func (p *WorkPool) NewPoolWithFunc(name string, work int, logic Logic) *Pool
- func (p *WorkPool) SetLogger(l *log.Logger) *WorkPool
- func (p *WorkPool) SetMaxWorker(worker int) *WorkPool
- func (p *WorkPool) Statistics() Statistics
- type WorkStatistics
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisablePoolGlobal ¶
func DisablePoolGlobal()
func PoolGlobalLoadTotal ¶
func PoolGlobalLoadTotal() uint64
func SetPoolGlobalMaxWorker ¶
func SetPoolGlobalMaxWorker(worker int)
Types ¶
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
func NewPoolGlobal ¶
func (*Pool) NewSubPool ¶
func (*Pool) NewSubPoolWithFunc ¶
func (*Pool) SetDefLogic ¶
func (*Pool) SubmitWait ¶
func (p *Pool) SubmitWait(i interface{})
func (*Pool) SubmitWithFunc ¶
func (*Pool) SubmitWithFuncWait ¶
func (*Pool) SubmitWithTimeout ¶
type Statistics ¶
type Statistics struct { TotalTask uint64 TotalWork uint32 TotalWait uint64 WorkStatisticsMap map[string]*WorkStatistics }
func PoolGlobalStatistics ¶
func PoolGlobalStatistics() Statistics
type SubPool ¶
type SubPool struct {
// contains filtered or unexported fields
}
func (*SubPool) LoadWaitCount ¶
func (*SubPool) SubmitWait ¶
func (p *SubPool) SubmitWait(i interface{})
func (*SubPool) SubmitWithFunc ¶
func (*SubPool) SubmitWithFuncWait ¶
type WorkPool ¶
type WorkPool struct {
// contains filtered or unexported fields
}
func (*WorkPool) NewPoolWithFunc ¶
func (*WorkPool) SetMaxWorker ¶
func (*WorkPool) Statistics ¶
func (p *WorkPool) Statistics() Statistics
Click to show internal directories.
Click to hide internal directories.