mirror of https://github.com/golang/go.git
runtime: add Gosched to TestSelectStackAdjust loop
Give the runtime more of a chance to do other work in a tight loop. Fixes #34693 Change-Id: I8df6173d2c93ecaccecf4520a6913b495787df78 Reviewed-on: https://go-review.googlesource.com/c/go/+/210217 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
a037582eff
commit
d2dec04056
|
|
@ -719,6 +719,7 @@ func TestSelectStackAdjust(t *testing.T) {
|
|||
if after.NumGC-before.NumGC >= 2 {
|
||||
goto done
|
||||
}
|
||||
runtime.Gosched()
|
||||
}
|
||||
t.Fatal("failed to trigger concurrent GC")
|
||||
done:
|
||||
|
|
|
|||
Loading…
Reference in New Issue