Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TaskRunner ¶
type TaskRunner struct {
// contains filtered or unexported fields
}
func StartTaskRunner ¶
func StartTaskRunner(no_of_workers int, logger_out io.Writer) *TaskRunner
func (*TaskRunner) CreateBufferedTaskRunner ¶
func (runner *TaskRunner) CreateBufferedTaskRunner(size int) chan Task
func (*TaskRunner) EnqueueTask ¶
func (runner *TaskRunner) EnqueueTask(newTask Task)
func (*TaskRunner) Stop ¶
func (runner *TaskRunner) Stop()
type Worker ¶
type Worker struct {
ID int
TaskQueue chan Task
WorkerQueue chan chan Task
StopSignal chan bool
// contains filtered or unexported fields
}
* Worker type. * The task queue is the incoming tasks channel. * The worker queue is the queue of workers it will add itself to. * Stop channel to stop the worker.
Click to show internal directories.
Click to hide internal directories.