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

Suggestion: mention the new SetLimit function found in the golang.org/x/sync errgroup package in README.md #14

Closed
narsimhamchelluri-ds opened this issue Aug 14, 2022 · 1 comment

Comments

@narsimhamchelluri-ds
Copy link

It looks like the sync/errgroup package now has a SetLimit function. You can see the documentation at https://pkg.go.dev/golang.org/x/sync/errgroup#Group.SetLimit . I believe that this is a fairly recent happening.

I feel like a mention of this new function in the original package in the README.md is probably merited.

There is some difference in the two APIs of the two packages; this one has a WithContextN(ctx, numG, qSize) function whereas that one has just WithContext(ctx) and SetLimit(n) functions. At a glance it seems like the n in the original pretty similar to the numG parameter here, and there doesn't seem to be a qSize parameter in the original package. I definitely have not compared the two packages in detail, or really even attempted to understand the implementation of either one. I am just an end-user.

I used this package some time ago at a previous job (maybe two of them, actually, I can't quite remember) and it was helpful for my purposes, so thank you for that. Ultimately, I'm wondering now if using this package in new code is necessary or recommended, given the new SetLimit function in the original package, and would appreciate hearing any thoughts from more knowledgeable sources.

@neilotoole
Copy link
Owner

Done.

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

No branches or pull requests

2 participants