Commit d2dec040 authored by Ian Lance Taylor's avatar Ian Lance Taylor

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: default avatarBrad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: default avatarBryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent a037582e
...@@ -719,6 +719,7 @@ func TestSelectStackAdjust(t *testing.T) { ...@@ -719,6 +719,7 @@ func TestSelectStackAdjust(t *testing.T) {
if after.NumGC-before.NumGC >= 2 { if after.NumGC-before.NumGC >= 2 {
goto done goto done
} }
runtime.Gosched()
} }
t.Fatal("failed to trigger concurrent GC") t.Fatal("failed to trigger concurrent GC")
done: done:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment