Skip to content

Commit

Permalink
Update docs on the Go/Wait interaction.
Browse files Browse the repository at this point in the history
  • Loading branch information
creachadair committed Mar 19, 2024
1 parent e780b86 commit cca22ae
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions taskgroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,11 @@ func (g *Group) handleError(err error) {
// group and not filtered by an ErrorFunc.
//
// As with sync.WaitGroup, new tasks can be added to g during a call to Wait
// only if there was already at least one task active when Wait was called.
// After Wait has returned, the group is ready for reuse.
// only if the group contains at least one active task when Wait is called and
// continuously thereafter until the last concurrent call to g.Go returns.
//
// Wait may be called from at most one goroutine at a time.
// Wait may be called from at most one goroutine at a time. After Wait has
// returned, the group is ready for reuse.
func (g *Group) Wait() error {
g.wg.Wait()
g.μ.Lock()
Expand Down

0 comments on commit cca22ae

Please sign in to comment.