concurrent

package
v1.4.15 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2017 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 Result

type Result struct {
	Msg string
	Err error
}

Result is a simple model of a concurrent task, having a simple payload and an error.

func ScatterGather

func ScatterGather(wt workTable, onSuccess successHandler, onError errorHandler) []Result

ScatterGather forks the workTable into separate goroutines with callbacks onSuccess and onError. The results are gathered in slice. Neither onSuccess nor onError should panic, otherwise ScatterGather panics.

Jump to

Keyboard shortcuts

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