Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MaxQueue = 100 // A buffered channel that we can send work requests on. JobQueue chan Job )
Functions ¶
This section is empty.
Types ¶
type Dispatcher ¶
type Dispatcher struct { WorkerPool chan chan Job // contains filtered or unexported fields }
func NewDispatcher ¶
func NewDispatcher(maxWorkers int) *Dispatcher
func (*Dispatcher) Run ¶
func (d *Dispatcher) Run()
type Worker ¶
type Worker struct { WorkerPool chan chan Job JobChannel chan Job // contains filtered or unexported fields }
Worker represents the worker that executes the job
Click to show internal directories.
Click to hide internal directories.