hashicorp / go-multierror

A Go (golang) package for representing a list of errors as a single error.
Mozilla Public License 2.0
2.28k stars 123 forks source link

add Group.SetLimit(n int) #94

Open markus-wa opened 6 months ago

markus-wa commented 6 months ago

This allows us to control the max number of goroutines that can be ran concurrently

markus-wa commented 6 months ago

note: golang.org/x/sync/errgroup already has this functionality - but unfortunately they only return the first error when more than one occurred - so I figured it made sense to add the SetLimit functionality here instead