concurrent

package module
v0.0.0-...-d5a1ce3 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2017 License: MIT Imports: 3 Imported by: 1

README

github.com/groovenauts/concurrent

Build Status

Usage

import "github.com/groovenauts/concurrent-go"

See https://github.com/groovenauts/concurrent-go/blob/master/workers_test.go for more detail.

Documentation

Index

Constants

View Source
const VERSION = "0.0.1"

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

type Job struct {
	Payload interface{}
	Error   error
}

type Jobs

type Jobs []*Job

func (Jobs) Error

func (jobs Jobs) Error() error

type Worker

type Worker struct {
	Proc func(job *Job) error
	// contains filtered or unexported fields
}

type Workers

type Workers []*Worker

func NewWorkers

func NewWorkers(proc func(job *Job) error, workers int) Workers

func (Workers) Done

func (ws Workers) Done() bool

func (Workers) Process

func (ws Workers) Process(jobs Jobs)

Jump to

Keyboard shortcuts

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