Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can 'gopool' support the extended use case of 'errgroup'? #147

Open
ryan961 opened this issue Jul 25, 2022 · 1 comment
Open

Can 'gopool' support the extended use case of 'errgroup'? #147

ryan961 opened this issue Jul 25, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@ryan961
Copy link

ryan961 commented Jul 25, 2022

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

@ryan961 ryan961 added the enhancement New feature or request label Jul 25, 2022
@PureWhiteWu
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants