parallel

package
v0.0.0-...-4ab6a2d Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	MaxPoolSize int
}

Options configure pool

type Pool

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

Pool

func NewPool

func NewPool(options *Options) *Pool

NewPool create new pool

func (*Pool) Err

func (p *Pool) Err() error

Err wait and get first error

func (*Pool) Feed

func (p *Pool) Feed(f func() error)

Feed a closure, non-block.

func (*Pool) Go

func (p *Pool) Go(f func())

Go feed a closure without error return

func (*Pool) Wait

func (p *Pool) Wait()

Wait wait for all closures to finish.

Jump to

Keyboard shortcuts

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