pool

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2018 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pool

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

Pool is a simple worker pool

func New

func New(workers int) *Pool

New creates a new pool with the given number of workers

func (*Pool) Execute

func (p *Pool) Execute(job func())

Execute enqueues the job to be executed by one of the workers in the pool

func (*Pool) Stop

func (p *Pool) Stop()

Stop halts all the workers

Jump to

Keyboard shortcuts

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