Versions in this module Expand all Collapse all v0 v0.1.11 Oct 3, 2023 v0.1.10 Oct 2, 2023 Changes in this version + type BlockingQueuedWorkerPool struct + func NewBlockingQueuedWorkerPool(optionalOptions ...Option) (result *BlockingQueuedWorkerPool) + func (b *BlockingQueuedWorkerPool) CreateTask(f func(), optionalStackTrace ...string) *WorkerPoolTask + func (b *BlockingQueuedWorkerPool) DecreasePendingTasksCounter() + func (b *BlockingQueuedWorkerPool) GetPendingQueueSize() int + func (b *BlockingQueuedWorkerPool) GetWorkerCount() int + func (b *BlockingQueuedWorkerPool) IncreasePendingTasksCounter() + func (b *BlockingQueuedWorkerPool) IsRunning() (isRunning bool) + func (b *BlockingQueuedWorkerPool) Run() + func (b *BlockingQueuedWorkerPool) Start() + func (b *BlockingQueuedWorkerPool) Stop() + func (b *BlockingQueuedWorkerPool) StopAndWait() + func (b *BlockingQueuedWorkerPool) Submit(handler func()) + func (b *BlockingQueuedWorkerPool) SubmitTask(task *WorkerPoolTask) + func (b *BlockingQueuedWorkerPool) TrySubmit(f func()) (added bool) + func (b *BlockingQueuedWorkerPool) TrySubmitTask(task *WorkerPoolTask) (added bool) + func (b *BlockingQueuedWorkerPool) WaitUntilAllTasksProcessed() + type Group struct + PendingChildrenCounter *syncutils.Counter + func NewGroup(name string) (group *Group) + func (g *Group) CreateGroup(name string) (group *Group) + func (g *Group) CreatePool(name string, optsWorkerCount ...int) (pool *UnboundedWorkerPool) + func (g *Group) Group(name string) (pool *Group, exists bool) + func (g *Group) Name() (name string) + func (g *Group) Pool(name string) (pool *UnboundedWorkerPool, exists bool) + func (g *Group) Pools() (pools map[string]*UnboundedWorkerPool) + func (g *Group) Root() *Group + func (g *Group) Shutdown() + func (g *Group) String() (humanReadable string) + func (g *Group) Wait() + func (g *Group) WaitAll() + 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 WithAlias(alias string) Option + func WorkerCount(workerCount int) Option + type Options struct + Alias string + 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 UnboundedWorkerPool struct + Name string + PendingTasksCounter *syncutils.Counter + Queue *syncutils.Stack[*WorkerPoolTask] + ShutdownComplete sync.WaitGroup + func NewUnboundedWorkerPool(name string, optsWorkerCount ...int) (newUnboundedWorkerPool *UnboundedWorkerPool) + func (u *UnboundedWorkerPool) IsRunning() (isRunning bool) + func (u *UnboundedWorkerPool) Shutdown(cancelPendingTasks ...bool) (self *UnboundedWorkerPool) + func (u *UnboundedWorkerPool) Start() (self *UnboundedWorkerPool) + func (u *UnboundedWorkerPool) Submit(task func(), optStackTrace ...string) + func (u *UnboundedWorkerPool) WorkerCount() (workerCount int) + 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) + type WorkerPoolTask struct