sync

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2019 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 BoundedWaitGroup

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

BoundedWaitGroup is a wait group which has a limit boundary meaning it will wait for Done() to be called before releasing Add(n) if the limit has been reached

func NewBoundedWaitGroup

func NewBoundedWaitGroup(cap int) BoundedWaitGroup

NewBoundedWaitGroup returns a new BoundedWaitGroup

func (*BoundedWaitGroup) Add

func (bwg *BoundedWaitGroup) Add(delta int)

Add ...

func (*BoundedWaitGroup) Done

func (bwg *BoundedWaitGroup) Done()

Done ...

func (*BoundedWaitGroup) Wait

func (bwg *BoundedWaitGroup) Wait()

Wait ...

type Waiter

type Waiter interface {
	Add(int)
	Done()
	Wait()
}

Waiter interface

func NewWaiter

func NewWaiter(cap int) Waiter

NewWaiter returns a Waiter, a sync.WaitGroup if cap i <= 0, a BoundedWaitGroup otherwise.

Jump to

Keyboard shortcuts

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