gogroup

package
v0.0.0-...-0e8dd81 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2019 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GroupJob

type GroupJob func(func(func())) error

GroupJob represents the job for a group

type WorkGroup

type WorkGroup interface {
	io.Closer

	Engine() string // the engine being used

	Add(job *GroupJob)     // Adds a job to this group
	Wait() error           // Waits for this group to finish, returning any errors
	UWait(err error) error // Same as wait, but only returns an error iff the given one is not nil
}

WorkGroup represents a group that performs parallel work

func NewWorkGroup

func NewWorkGroup(xthreads int, needsSync bool) (group WorkGroup)

NewWorkGroup creates a new work group xthreads is the maximal number of parallel jobs <= 0 for unlimited. needsSync should be true if jobs also need to perform syncronous work, such as logging

Jump to

Keyboard shortcuts

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