Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dispatcher ¶
type Dispatcher struct { WorkerPool chan chan Job WorkerList []*Worker JobQueue chan Job // contains filtered or unexported fields }
func NewDispatcher ¶
func NewDispatcher(maxWaitingJobs int, maxWorkers int) *Dispatcher
func (*Dispatcher) AddWorker ¶
func (d *Dispatcher) AddWorker(handler JobHandler)
func (*Dispatcher) Dispatch ¶
func (d *Dispatcher) Dispatch()
func (*Dispatcher) Queue ¶
func (d *Dispatcher) Queue(job Job)
func (*Dispatcher) Run ¶
func (d *Dispatcher) Run()
func (*Dispatcher) Stop ¶
func (d *Dispatcher) Stop()
type JobHandler ¶
Click to show internal directories.
Click to hide internal directories.