Documentation ¶
Index ¶
- Variables
- type PanicFunc
- type Task
- type WorkPool
- func (wp *WorkPool) AdjustSize(workSize int)
- func (wp *WorkPool) Cap() uint
- func (wp *WorkPool) Close()
- func (wp *WorkPool) Continue(workerNum ...int)
- func (wp *WorkPool) Do(fn Task) error
- func (wp *WorkPool) DoWithTimeout(fn Task, t time.Duration) error
- func (wp *WorkPool) Injector() zdi.TypeMapper
- func (wp *WorkPool) IsClosed() bool
- func (wp *WorkPool) PanicFunc(handler PanicFunc)
- func (wp *WorkPool) Pause()
- func (wp *WorkPool) PreInit() error
- func (wp *WorkPool) Wait()
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrPoolClosed = errors.New("pool has been closed") ErrWaitTimeout = errors.New("pool wait timeout") )
Functions ¶
This section is empty.
Types ¶
type WorkPool ¶ added in v1.1.16
type WorkPool struct { New func() // contains filtered or unexported fields }
func (*WorkPool) AdjustSize ¶ added in v1.1.16
AdjustSize adjust the pool size
func (*WorkPool) DoWithTimeout ¶ added in v1.1.16
func (*WorkPool) Injector ¶ added in v1.3.0
func (wp *WorkPool) Injector() zdi.TypeMapper
Click to show internal directories.
Click to hide internal directories.