sizedwaitgroup icon indicating copy to clipboard operation
sizedwaitgroup copied to clipboard

SizedWaitGroup has the same role and close to the same API as the Golang sync.WaitGroup but it adds a limit on the amount of goroutines started concurrently.

Results 6 sizedwaitgroup issues
Sort by recently updated
recently updated
newest added

I noticed a `break-select` in `sizewaitgroup.go`, which was used in `AddWithContext` Method, but `break` keyword can not jump out of the `select` in `Golang`. Although it looks like properly worked...

Am I right in thinking the use case here is very similar to [golang.org/x/sync/errgroup](https://pkg.go.dev/golang.org/x/sync/errgroup) ? If so, it would be good to add something to the README that mentions why...

This is the companion to the `AddWithContext(context.Context)` method to give `Wait` the same awareness of cancellation by a context.

enhancement

Is it possible to change the size of an SizedWaitGroup which is already in use?

For my applications, it would be helpful to be able to `Add(n)` and `Done(n)`, rather than having to do this with tons of individual `Add()`, `Done()` calls.