x/sync/errgroup: clarify that Go calls the function regardless of prior errors #54045
Labels
Documentation
FrozenDueToAge
help wanted
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What did you do?
What did you expect to see?
The documentation for errgroup states:
I would assume that if the first call to return a non-nil error cancels the group, future funcs passed to go won't run.
Furthermore calls to
group.Wait()
should return immediately rather than waiting for funcs created after the group was cancelled to complete.What did you see instead?
All funcs are called, even those created after the group was cancelled.
group.Wait()
waits for all funcs to complete before returning.The text was updated successfully, but these errors were encountered: