Documentation ¶
Index ¶
- Variables
- type BatchWorkerPool
- func (wp *BatchWorkerPool) GetBatchSize() int
- func (wp *BatchWorkerPool) GetPendingQueueSize() int
- func (wp *BatchWorkerPool) GetWorkerCount() int
- func (wp *BatchWorkerPool) Run()
- func (wp *BatchWorkerPool) Start()
- func (wp *BatchWorkerPool) Stop()
- func (wp *BatchWorkerPool) StopAndWait()
- func (wp *BatchWorkerPool) Submit(params ...interface{}) (result chan interface{})
- type Option
- type Options
- type Task
Constants ¶
This section is empty.
Variables ¶
View Source
var DEFAULT_OPTIONS = &Options{ WorkerCount: 2 * runtime.NumCPU(), QueueSize: 2 * runtime.NumCPU() * 64, BatchSize: 64, BatchCollectionTimeout: 15 * time.Millisecond, }
Functions ¶
This section is empty.
Types ¶
type BatchWorkerPool ¶
type BatchWorkerPool struct {
// contains filtered or unexported fields
}
func New ¶
func New(workerFnc func([]Task), optionalOptions ...Option) (result *BatchWorkerPool)
func (*BatchWorkerPool) GetBatchSize ¶
func (wp *BatchWorkerPool) GetBatchSize() int
func (*BatchWorkerPool) GetPendingQueueSize ¶
func (wp *BatchWorkerPool) GetPendingQueueSize() int
func (*BatchWorkerPool) GetWorkerCount ¶
func (wp *BatchWorkerPool) GetWorkerCount() int
func (*BatchWorkerPool) Run ¶
func (wp *BatchWorkerPool) Run()
func (*BatchWorkerPool) Start ¶
func (wp *BatchWorkerPool) Start()
func (*BatchWorkerPool) Stop ¶
func (wp *BatchWorkerPool) Stop()
func (*BatchWorkerPool) StopAndWait ¶
func (wp *BatchWorkerPool) StopAndWait()
func (*BatchWorkerPool) Submit ¶
func (wp *BatchWorkerPool) Submit(params ...interface{}) (result chan interface{})
Click to show internal directories.
Click to hide internal directories.