Package limitgroup provides a sync.WaitGroup equivalent with a configurable upper bound. This is implemented by having Add() block as well if necessary.
LimitGroup provides a WaitGroup with a limited upper bound. Once the limit is hit, Add will block until sufficient deltas are returned.
NewLimitGroup creates a new LimitGroup with the configured limit.
Add adds delta, which may be negative. It will block if we have hit the limit, and will unblock as Done is called.
Done decrements the counter.