workerqueue

package
v0.0.0-...-392b1d9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	Add(*func())
	Stop()
}

Interface of a workerqueue.

func NewWorkerQueue

func NewWorkerQueue(size int) Interface

NewWorkerQueue creates new WorkerQueue with worker group of given size.

type WorkerQueue

type WorkerQueue struct {
	// contains filtered or unexported fields
}

WorkerQueue is worker group with a task queue.

func (*WorkerQueue) Add

func (wq *WorkerQueue) Add(f *func())

Add adds a new task to the queue.

func (*WorkerQueue) Stop

func (wq *WorkerQueue) Stop()

Stop stops the working group.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL