MCPcopy
hub / github.com/grafana/tempo / BoundedWaitGroup

Struct BoundedWaitGroup

pkg/boundedwaitgroup/boundedwaitgroup.go:6–9  ·  view source on GitHub ↗

BoundedWaitGroup like a normal wait group except limits number of active goroutines to given capacity.

Source from the content-addressed store, hash-verified

4
5// BoundedWaitGroup like a normal wait group except limits number of active goroutines to given capacity.
6type BoundedWaitGroup struct {
7 wg sync.WaitGroup
8 ch chan struct{} // Chan buffer size is used to limit concurrency.
9}
10
11// New creates a BoundedWaitGroup with the given concurrency.
12func New(capacity uint) BoundedWaitGroup {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected