Documentation ¶
Index ¶
- Variables
- type Option
- type Options
- type Task
- type WorkerPool
- func (wp *WorkerPool) GetPendingQueueSize() int
- func (wp *WorkerPool) GetWorkerCount() int
- func (wp *WorkerPool) Run()
- func (wp *WorkerPool) Start()
- func (wp *WorkerPool) Stop()
- func (wp *WorkerPool) StopAndWait()
- func (wp *WorkerPool) Submit(params ...interface{}) (result chan interface{})
- func (wp *WorkerPool) TrySubmit(params ...interface{}) (result chan interface{}, added bool)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Options)
func FlushTasksAtShutdown ¶ added in v0.2.7
func WorkerCount ¶
type WorkerPool ¶
type WorkerPool struct {
// contains filtered or unexported fields
}
func New ¶
func New(workerFnc func(Task), optionalOptions ...Option) (result *WorkerPool)
func (*WorkerPool) GetPendingQueueSize ¶
func (wp *WorkerPool) GetPendingQueueSize() int
func (*WorkerPool) GetWorkerCount ¶
func (wp *WorkerPool) GetWorkerCount() int
func (*WorkerPool) Run ¶
func (wp *WorkerPool) Run()
func (*WorkerPool) Start ¶
func (wp *WorkerPool) Start()
func (*WorkerPool) Stop ¶
func (wp *WorkerPool) Stop()
func (*WorkerPool) StopAndWait ¶
func (wp *WorkerPool) StopAndWait()
func (*WorkerPool) Submit ¶
func (wp *WorkerPool) Submit(params ...interface{}) (result chan interface{})
func (*WorkerPool) TrySubmit ¶
func (wp *WorkerPool) TrySubmit(params ...interface{}) (result chan interface{}, added bool)
Click to show internal directories.
Click to hide internal directories.