Skip to content

Commit

Permalink
Update docs on how activation works in Group.
Browse files Browse the repository at this point in the history
  • Loading branch information
creachadair committed Mar 19, 2024
1 parent dafc5b5 commit e780b86
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions taskgroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ type Group struct {

// active is nonzero when the group is "active", meaning there has been at
// least one call to Go since the group was created or the last Wait.
//
// Together active and μ work as a kind of resettable sync.Once; the fast
// path reads active and only acquires μ if it discovers setup is needed.
active atomic.Uint32

μ sync.Mutex // guards err
Expand Down

0 comments on commit e780b86

Please sign in to comment.