aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/proc.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/proc.go')
-rw-r--r--src/runtime/proc.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/proc.go b/src/runtime/proc.go
index aa2ba96c8f..c14a1f143c 100644
--- a/src/runtime/proc.go
+++ b/src/runtime/proc.go
@@ -5840,7 +5840,7 @@ const randomizeScheduler = raceenabled
// If the run queue is full, runnext puts g on the global queue.
// Executed only by the owner P.
func runqput(_p_ *p, gp *g, next bool) {
- if randomizeScheduler && next && fastrand()%2 == 0 {
+ if randomizeScheduler && next && fastrandn(2) == 0 {
next = false
}