-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(bug) : use copy of loop variable in Go routines (#8163)
This fixes cases where loop variables are incorrectly captured in asynchronous code (parallel tests or Go routines). In the case of a parallel test, the most likely scenario is that only the last test case will be executed. In the case of Go routines that directly access loop variables without any synchronization, the value stored in the loop variable will likely not be the same as what it was when the Go routine is created.
- Loading branch information
1 parent
9b38119
commit b69b8e5
Showing
2 changed files
with
3 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters