chore: build with Go 1.26; use Go 1.25 features (#10570)
WaitGroup.Go and built-in gomaxprocs handling. Signed-off-by: Jakob Borg <jakob@kastelo.net>
This commit is contained in:
@@ -48,16 +48,13 @@ func TestTimeoutCond(t *testing.T) {
|
||||
var results [routines][2]int
|
||||
var wg sync.WaitGroup
|
||||
for i := 0; i < routines; i++ {
|
||||
i := i
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
wg.Go(func() {
|
||||
d := time.Duration(i) * timeMult * time.Millisecond
|
||||
t.Logf("Routine %d waits for %v\n", i, d)
|
||||
succ, fail := runLocks(t, iterations, c, d)
|
||||
results[i][0] = succ
|
||||
results[i][1] = fail
|
||||
wg.Done()
|
||||
}()
|
||||
})
|
||||
}
|
||||
|
||||
wg.Wait()
|
||||
|
||||
Reference in New Issue
Block a user