Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var JobQueue chan Job
JobQueue A buffered channel that we can send work requests on.
Functions ¶
This section is empty.
Types ¶
type Dispatcher ¶
type Dispatcher struct { // A pool of workers channels that are registered with the dispatcher MaxWorkers int WorkerPool chan chan Job }
Dispatcher 工作池
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.