-
Notifications
You must be signed in to change notification settings - Fork 183
chore(waitgroup): update usage to Go 1.25 #872
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
chore(waitgroup): update usage to Go 1.25 #872
Conversation
Signed-off-by: Elia-Renzoni <[email protected]>
Pull Request Test Coverage Report for Build 19391845735Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
|
@jranson I was wondering if it might be possible to merge it, so I can work on some new changes without running into conflicts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Elia-Renzoni thanks for this, and sorry I needed more time to review it. As of go 1.22, for loop variables are properly assigned per-iteration, so they should be concurrency-safe when passed into goroutines. See notes below for when you can do that without needing any loop helper vars. The index-out-of-bounds errors are specific to variables that are not controlled by / declared in the for clause, so those non-clause helpers were OK to keep but must be declared before/outside of the wg.Go() to avoid data race conditions.
Signed-off-by: Elia-Renzoni <[email protected]>
This PR updates the usage of WaitGroups to align with Go 1.25.
Changes
Notes
Related issue: #870
Thanks for reviewing — any feedback is appreciated.