errgroup: use consistent read for SetLimit panic This could produce a confusing panic message if the second len(g.sem) call returns 0. Avoid that by reading it once. Change-Id: Ibdb4963f90921bc20427b3f1e2de410638f6cb6b Reviewed-on: https://go-review.googlesource.com/c/sync/+/726280 Reviewed-by: Alan Donovan <adonovan@google.com> Auto-Submit: Alan Donovan <adonovan@google.com> Reviewed-by: Sean Liao <sean@liao.dev> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
This repository provides Go concurrency primitives in addition to the ones provided by the language and “sync” and “sync/atomic” packages.
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://go.dev/doc/contribute.
The git repository is https://go.googlesource.com/sync.
The main issue tracker for the sync repository is located at https://go.dev/issues. Prefix your issue with “x/sync:” in the subject line, so it is easy to find.