workpool

package
v0.0.0-...-c040d8b Latest Latest
Warning

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

Go to latest
Published: May 4, 2015 License: Apache-2.0, BSD-2-Clause-Views, BSD-3-Clause, + 1 more Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultAround = AroundWorkFunc(func(work func()) {
	work()
})

Functions

This section is empty.

Types

type AroundWork

type AroundWork interface {
	Around(func())
}

type AroundWorkFunc

type AroundWorkFunc func(work func())

func (AroundWorkFunc) Around

func (f AroundWorkFunc) Around(work func())

type WorkPool

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

func New

func New(workers, pending int, aroundWork AroundWork) *WorkPool

func NewWorkPool

func NewWorkPool(workers int) *WorkPool

func (*WorkPool) Stop

func (w *WorkPool) Stop()

func (*WorkPool) Submit

func (w *WorkPool) Submit(work func())

Jump to

Keyboard shortcuts

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