timeoutwaitgroup

package
v0.0.0-...-57f4fd1 Latest Latest
Warning

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

Go to latest
Published: May 31, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TimeoutWaitGroup

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

TimeoutWaitGroup is a wrapper around sync.WaitGroup that will wait for no longer than a given duration.

func New

func New(timeout time.Duration) *TimeoutWaitGroup

New returns a new TimeoutWaitGroup with the given timeout period.

func (*TimeoutWaitGroup) Add

func (s *TimeoutWaitGroup) Add(delta int)

Add adds items to the WaitGroup.

func (*TimeoutWaitGroup) Done

func (s *TimeoutWaitGroup) Done()

Done removes a single item from the WaitGroup.

func (*TimeoutWaitGroup) Wait

func (s *TimeoutWaitGroup) Wait()

Wait will return after the configured timeout or once everything in the group is done, whichever comes first.

Jump to

Keyboard shortcuts

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