Commit f45dcea
committed
fix: capture loop variable by value in TestLockerMultipleWaiters
The loop variable `i` was captured by reference in the closure, causing
all goroutines to write to `results[9]` instead of their respective
indices. This fix captures the loop variable by value to ensure each
goroutine uses the correct index.1 parent 2850f91 commit f45dcea
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| 217 | + | |
| 218 | + | |
217 | 219 | | |
218 | 220 | | |
219 | 221 | | |
| |||
0 commit comments