Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var WorkQueue = make(chan WorkRequest, 100)
View Source
var WorkerQueue chan chan WorkRequest
Functions ¶
func RunScript ¶
func RunScript(work *WorkRequest) (string, error)
func StartDispatcher ¶
func StartDispatcher(nworkers int)
Types ¶
type WorkRequest ¶
type Worker ¶
type Worker struct {
ID int
Work chan WorkRequest
WorkerQueue chan chan WorkRequest
QuitChan chan bool
}
func NewWorker ¶
func NewWorker(id int, workerQueue chan chan WorkRequest) Worker
NewWorker creates, and returns a new Worker object. Its only argument is a channel that the worker can add itself to whenever it is done its work.
Click to show internal directories.
Click to hide internal directories.