parallel

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WaitGroup

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

WaitGroup is an extension to sync.WaitGroup that provided channel for errors.

func NewWaitGroup

func NewWaitGroup() *WaitGroup

NewWaitGroup initializes new *WaitGroup and runs errors collection goroutine.

func (*WaitGroup) Add

func (wg *WaitGroup) Add(i int)

Add adds delta to WaitGroup counter.

func (*WaitGroup) Done

func (wg *WaitGroup) Done()

Done decrements WaitGroup counter by 1.

func (*WaitGroup) ErrChan

func (wg *WaitGroup) ErrChan() chan<- error

ErrChan returns channel for errors.

func (*WaitGroup) Wait

func (wg *WaitGroup) Wait() error

Wait waits for all goroutines to exit (via Done method) and returns multierror for all errors or nil.

Jump to

Keyboard shortcuts

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