waitgroup

package
v0.0.0-...-d691e2b Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 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 SafeWaitGroup

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

SafeWaitGroup must not be copied after first use.

func (*SafeWaitGroup) Add

func (wg *SafeWaitGroup) Add(delta int) error

Add adds delta, which may be negative, similar to sync.WaitGroup. If Add with a positive delta happens after Wait, it will return error, which prevent unsafe Add.

func (*SafeWaitGroup) Done

func (wg *SafeWaitGroup) Done()

Done decrements the WaitGroup counter.

func (*SafeWaitGroup) Wait

func (wg *SafeWaitGroup) Wait()

Wait blocks until the WaitGroup counter is zero.

Jump to

Keyboard shortcuts

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