worker

package module
v0.0.0-...-30d9bec Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WorkerPool

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

func (*WorkerPool) ActiveWorksCount

func (this *WorkerPool) ActiveWorksCount() int

func (*WorkerPool) AddWork

func (this *WorkerPool) AddWork(task func()) (err error)

func (*WorkerPool) Quit

func (this *WorkerPool) Quit()

func (*WorkerPool) QuitWait

func (this *WorkerPool) QuitWait()

func (*WorkerPool) Start

func (this *WorkerPool) Start(maxWorkers int)

type WorkerPoolUnlimited

type WorkerPoolUnlimited struct {
	// max idle time before closing a worker
	MaxIdle time.Duration
	// contains filtered or unexported fields
}

func (*WorkerPoolUnlimited) AddWork

func (this *WorkerPoolUnlimited) AddWork(task func()) (err error)

func (*WorkerPoolUnlimited) Quit

func (this *WorkerPoolUnlimited) Quit()

func (*WorkerPoolUnlimited) QuitWait

func (this *WorkerPoolUnlimited) QuitWait()

Jump to

Keyboard shortcuts

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