[sync] errgroup: use consistent read for SetLimit panic

0 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
Dec 3, 2025, 7:24:43 PM (7 hours ago) Dec 3
to Justin Mayhew, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Dmitri Shuralyov, Dmitri Shuralyov, Alan Donovan, Go LUCI, golang-co...@googlegroups.com

Gopher Robot submitted the change

Change information

Commit message:
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-by: Alan Donovan <adon...@google.com>
Auto-Submit: Alan Donovan <adon...@google.com>
Reviewed-by: Sean Liao <se...@liao.dev>
Reviewed-by: Dmitri Shuralyov <dmit...@google.com>
Files:
  • M errgroup/errgroup.go
Change size: XS
Delta: 1 file changed, 2 insertions(+), 2 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Sean Liao, +1 by Dmitri Shuralyov, +2 by Alan Donovan
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: sync
Gerrit-Branch: master
Gerrit-Change-Id: Ibdb4963f90921bc20427b3f1e2de410638f6cb6b
Gerrit-Change-Number: 726280
Gerrit-PatchSet: 2
Gerrit-Owner: Justin Mayhew <may...@live.ca>
Gerrit-Reviewer: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@google.com>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Sean Liao <se...@liao.dev>
Gerrit-CC: Dmitri Shuralyov <dmit...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages