gopkg
gopkg copied to clipboard
Can 'gopool' support the extended use case of 'errgroup'?
Summary
......
// Similar: group, ctxx := errgroup.WithCancelPool(ctx, pool)
group, ctxx := errgroup.WithCancel(ctx)
group.Go(func(ctxx)error)
if err := group.Wait(); err != nil {
return;
}
......
Motivation
gopool
features (Auto-recovering Panics, Limit Goroutine Numbers, Reuse Goroutine Stack...) can make up for the lack of errgroup
very well.
Explanation
No response
Hi, there's no plan currently, because this will greatly affect the performance, and gopool and errgroup has different design. If you need these functions, you can use errgroup in these scenes, and use gopool in other scenes.