woker_pool

package
v0.0.0-...-668a133 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dispatcher

type Dispatcher struct {
	// contains filtered or unexported fields
}

func NewDispatcher

func NewDispatcher(workers int) *Dispatcher

func (*Dispatcher) Start

func (d *Dispatcher) Start()

func (*Dispatcher) Stop

func (d *Dispatcher) Stop()

type Task

type Task interface {
	Run()
}

type TaskCh

type TaskCh chan Task

type Worker

type Worker struct {
	ID int
	// contains filtered or unexported fields
}

func NewWorker

func NewWorker(ID int, workerCh chan TaskCh) *Worker

func (*Worker) Done

func (w *Worker) Done()

func (*Worker) Start

func (w *Worker) Start()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL