We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When using sync.WaitGroup, very often it is used like so:
sync.WaitGroup
var wg sync.WaitGroup wg.Add(1) go func() { defer wg.Done() // Some code }()
Of course, this is not the only use case, but it is by far the most common. It would be convenient to add a method used like:
var wg sync.WaitGroup wg.Run(func() { // Some code })
func (wg *sync.WaitGroup) Run(f func()) { wg.Add(1) go func() { defer wg.Done() f() }() }
The text was updated successfully, but these errors were encountered:
Duplicate of #39863
Sorry, something went wrong.
No branches or pull requests
When using
sync.WaitGroup
, very often it is used like so:Of course, this is not the only use case, but it is by far the most common. It would be convenient to add a method used like:
The text was updated successfully, but these errors were encountered: