File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed
Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 11module github.com/lif0/pkg/concurrency
22
3- go 1.22
3+ go 1.19
44
55require github.com/stretchr/testify v1.11.1
66
Original file line number Diff line number Diff line change 11module github.com/lif0/pkg/sync
22
3- go 1.18
3+ go 1.19
44
55require (
66 github.com/petermattis/goid v0.0.0-20250904145737-900bdf8bb490
Original file line number Diff line number Diff line change 11package sync
22
33import (
4- "math/rand/v2 "
4+ "math/rand"
55 "sync"
66 "testing"
77 "time"
@@ -72,7 +72,7 @@ func TestMutualExclusion(t *testing.T) {
7272 defer wg .Done ()
7373
7474 rm .Lock ()
75- v [rand.N [ int ] (10e9 )]++
75+ v [rand .Intn (10e9 )]++
7676 defer rm .Unlock ()
7777 }()
7878 }
@@ -233,7 +233,7 @@ func TestMutexPerformance(t *testing.T) {
233233 b .RunParallel (func (pb * testing.PB ) {
234234 for pb .Next () {
235235 mx .Lock ()
236- v [rand.N [ int ] (10e9 )]++
236+ v [rand .Intn (10e9 )]++
237237 mx .Unlock ()
238238 }
239239 })
@@ -250,7 +250,7 @@ func TestMutexPerformance(t *testing.T) {
250250 b .RunParallel (func (pb * testing.PB ) {
251251 for pb .Next () {
252252 mx .Lock ()
253- v [rand.N [ int ] (10e9 )]++
253+ v [rand .Intn (10e9 )]++
254254 mx .Unlock ()
255255 }
256256 })
Original file line number Diff line number Diff line change 11module github.com/lif0/pkg/utils
22
3- go 1.22
3+ go 1.19
44
55require github.com/stretchr/testify v1.11.1
66
You can’t perform that action at this time.
0 commit comments