Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: golang/sync
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: b637f27
Choose a base ref
...
head repository: golang/sync
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 396f3a0
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Apr 2, 2025

  1. errgroup: document calling Go before Wait

    Fixes golang/go#70284
    
    Change-Id: I31d60ea182226c032b0ffbddcbb5b53675dfd5e6
    Reviewed-on: https://go-review.googlesource.com/c/sync/+/660075
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Reviewed-by: Alan Donovan <adonovan@google.com>
    Auto-Submit: Damien Neil <dneil@google.com>
    Reviewed-by: Damien Neil <dneil@google.com>
    seankhliao authored and gopherbot committed Apr 2, 2025
    Copy the full SHA
    396f3a0 View commit details
Showing with 2 additions and 1 deletion.
  1. +2 −1 errgroup/errgroup.go
3 changes: 2 additions & 1 deletion errgroup/errgroup.go
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ import (
type token struct{}

// A Group is a collection of goroutines working on subtasks that are part of
// the same overall task.
// the same overall task. A Group should not be reused for different tasks.
//
// A zero Group is valid, has no limit on the number of active goroutines,
// and does not cancel on error.
@@ -61,6 +61,7 @@ func (g *Group) Wait() error {
}

// Go calls the given function in a new goroutine.
// The first call to Go must happen before a Wait.
// It blocks until the new goroutine can be added without the number of
// active goroutines in the group exceeding the configured limit.
//