1
0
mirror of https://github.com/golang/go synced 2024-11-23 07:30:05 -07:00

runtime: try harder to get different iteration orders.

Fixes #8736.

LGTM=iant, josharian
R=golang-codereviews, iant, josharian
CC=golang-codereviews
https://golang.org/cl/144910044
This commit is contained in:
Keith Randall 2014-09-15 12:30:57 -07:00
parent f197988ca5
commit 1e4f86e485

View File

@ -462,8 +462,9 @@ NextRound:
first = append(first, i)
}
// 80 chances to get a different iteration order.
for n := 0; n < 80; n++ {
// 800 chances to get a different iteration order.
// See bug 8736 for why we need so many tries.
for n := 0; n < 800; n++ {
idx := 0
for i := range m {
if i != first[idx] {