zq

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ZQ

type ZQ struct {
	WorkerCounter *zatomic.Int
	WorkerFn      func(int, any)
	ZQuit         *zquit.ZQuit
	Jobs          chan any
	// contains filtered or unexported fields
}

func Default added in v1.0.1

func Default(fn func(int, any)) *ZQ

func DefaultN added in v1.0.1

func DefaultN(qtyWorkers int, fn func(int, any)) *ZQ

func New

func New(qtyWorkers int, buff int, fn func(int, any)) *ZQ

func (*ZQ) AddJob

func (q *ZQ) AddJob(a any) error

func (*ZQ) AddJobForce added in v1.0.5

func (q *ZQ) AddJobForce(a any) error

func (*ZQ) AddWorker

func (q *ZQ) AddWorker(delta int)

func (*ZQ) MustJob added in v1.1.1

func (q *ZQ) MustJob(a any)

func (*ZQ) Quit

func (q *ZQ) Quit()

func (*ZQ) RemoveWorker

func (q *ZQ) RemoveWorker()

func (*ZQ) Wait

func (q *ZQ) Wait()

func (*ZQ) WithZQuit added in v1.0.4

func (q *ZQ) WithZQuit(quit *zquit.ZQuit) *ZQ

Jump to

Keyboard shortcuts

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