aboutsummaryrefslogtreecommitdiff
path: root/src/sync
diff options
context:
space:
mode:
Diffstat (limited to 'src/sync')
-rw-r--r--src/sync/pool.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sync/pool.go b/src/sync/pool.go
index 1ae70127ac..9802f29d6f 100644
--- a/src/sync/pool.go
+++ b/src/sync/pool.go
@@ -71,7 +71,7 @@ type poolLocal struct {
}
// from runtime
-func fastrand() uint32
+func fastrandn(n uint32) uint32
var poolRaceHash [128]uint64
@@ -92,7 +92,7 @@ func (p *Pool) Put(x interface{}) {
return
}
if race.Enabled {
- if fastrand()%4 == 0 {
+ if fastrandn(4) == 0 {
// Randomly drop x on floor.
return
}