Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync: docs say WaitGroup is a function, and that it panics #12060

Closed
elimisteve opened this issue Aug 6, 2015 · 1 comment
Closed

sync: docs say WaitGroup is a function, and that it panics #12060

elimisteve opened this issue Aug 6, 2015 · 1 comment

Comments

@elimisteve
Copy link
Contributor

From https://tip.golang.org/doc/go1.5 --

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.

@bradfitz 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
@bradfitz bradfitz added this to the Go1.5Maybe milestone Aug 6, 2015
@rsc
Copy link
Contributor

rsc commented Aug 6, 2015

@rsc rsc closed this as completed in 4b145d4 Aug 6, 2015
@mikioh mikioh modified the milestones: Go1.5, Go1.5Maybe Aug 6, 2015
@golang golang locked and limited conversation to collaborators Aug 5, 2016
@rsc rsc unassigned robpike Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants