joque

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2017 License: MIT Imports: 0 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

func Setup(maxQueueSize int, maxWorkers int) chan Job

Setup

Types

type Dispatcher

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

func NewDispatcher

func NewDispatcher(jobQueue chan Job, maxWorkers int) *Dispatcher

NewDispatcher creates, and returns a new Dispatcher object.

type Job

type Job func()

Job is a unit of work.

type Worker

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

func NewWorker

func NewWorker(id int, workerPool chan chan Job) Worker

NewWorker creates takes a numeric id and a channel w/ worker pool.

Jump to

Keyboard shortcuts

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