You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AIUI, pkg/pool has nearly the same interface and use case as errgroup:
run some functions in parallel using goroutines
stop and return an error when any goroutine fails
take a context.Context so the whole group can be stopped if the context is cancelled
be able to limit concurrency (typically to runtime.NumCPU)
It might have been that pool provided more functionality than errgroup at one point in time, but with errgroup getting SetLimitrecently, I don't think that's the case anymore.
Maintaining this code yourself is an option, but concurrency can get tricky, and if possible it'd probably be worth making it someone else's problem. Future performance improvements may get made to errgroup which we could just pick up.
As far as external users, cosign depends on pkg/pool, until sigstore/cosign#2092, and it looks like mink uses it too, but I can send a PR for that too.
/kind question
/area API
btw if this sounds good I'm happy to do the work to migrate knative's own usages, and help anybody else using it to migrate.
The text was updated successfully, but these errors were encountered:
AIUI,
pkg/pool
has nearly the same interface and use case aserrgroup
:context.Context
so the whole group can be stopped if the context is cancelledruntime.NumCPU
)It might have been that
pool
provided more functionality thanerrgroup
at one point in time, but witherrgroup
gettingSetLimit
recently, I don't think that's the case anymore.Maintaining this code yourself is an option, but concurrency can get tricky, and if possible it'd probably be worth making it someone else's problem. Future performance improvements may get made to
errgroup
which we could just pick up.As far as external users, cosign depends on pkg/pool, until sigstore/cosign#2092, and it looks like mink uses it too, but I can send a PR for that too.
/kind question
/area API
btw if this sounds good I'm happy to do the work to migrate knative's own usages, and help anybody else using it to migrate.
The text was updated successfully, but these errors were encountered: