boundedwaitgroup

package
v0.0.0-...-39c03fc Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: AGPL-3.0 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 like a normal wait group except limits number of active goroutines to given capacity.

func New

func New(cap uint) BoundedWaitGroup

New creates a BoundedWaitGroup with the given concurrency.

func (*BoundedWaitGroup) Add

func (bwg *BoundedWaitGroup) Add(delta int)

Add the number of items to the group. Blocks until there is capacity.

func (*BoundedWaitGroup) Done

func (bwg *BoundedWaitGroup) Done()

Done removes one from the wait group.

func (*BoundedWaitGroup) Wait

func (bwg *BoundedWaitGroup) Wait()

Wait for the wait group to finish.

Jump to

Keyboard shortcuts

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