Versions in this module Expand all Collapse all v3 v3.0.1 Aug 8, 2022 Changes in this version + var DEFAULT_OPTIONS = &Options + type NonBlockingQueuedWorkerPool struct + func NewNonBlockingQueuedWorkerPool(workerFunc func(Task), optionalOptions ...Option) (result *NonBlockingQueuedWorkerPool) + func (wp *NonBlockingQueuedWorkerPool) GetPendingQueueSize() int + func (wp *NonBlockingQueuedWorkerPool) GetWorkerCount() int + func (wp *NonBlockingQueuedWorkerPool) Stop() + func (wp *NonBlockingQueuedWorkerPool) StopAndWait() + func (wp *NonBlockingQueuedWorkerPool) Submit(params ...interface{}) (chan interface{}, bool) + func (wp *NonBlockingQueuedWorkerPool) TrySubmit(params ...interface{}) (result chan interface{}, added bool) + type Option func(*Options) + func FlushTasksAtShutdown(flush bool) Option + func QueueSize(queueSize int) Option + func WorkerCount(workerCount int) Option + type Options struct + FlushTasksAtShutdown bool + QueueSize int + WorkerCount int + func (options Options) Override(optionalOptions ...Option) *Options + type Task struct + func (task *Task) Param(index int) interface{} + func (task *Task) Return(result interface{}) + type WorkerPool struct + func New(workerFnc func(Task), optionalOptions ...Option) (result *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{}, added bool) + func (wp *WorkerPool) TrySubmit(params ...interface{}) (result chan interface{}, added bool) Other modules containing this package github.com/finderAUT/hive.go/v2