You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The WaitGroup function in package sync now diagnoses code that races a call to Add against a return from Wait. If it detects this condition, WaitGroup panics.
WaitGroup is a type, not a function. In looking at the race-related code in the WaitGroup.Add() and WaitGroup.Wait() methods, I think this line in the docs is supposed to read more like:
sync.WaitGroup's Add method now diagnoses code that races a call to Add against a return from Wait. If it detects this condition, Add panics.
The text was updated successfully, but these errors were encountered:
bradfitz
changed the title
go1.5rc1 docs say WaitGroup is a function, and that it panics
sync: docs say WaitGroup is a function, and that it panics
Aug 6, 2015
From https://tip.golang.org/doc/go1.5 --
WaitGroup
is a type, not a function. In looking at the race-related code in theWaitGroup.Add()
andWaitGroup.Wait()
methods, I think this line in the docs is supposed to read more like:The text was updated successfully, but these errors were encountered: