Skip to content

Commit d2dec04

Browse files
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 <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]> Reviewed-by: Bryan C. Mills <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent a037582 commit d2dec04

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/runtime/chan_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,7 @@ func TestSelectStackAdjust(t *testing.T) {
719719
if after.NumGC-before.NumGC >= 2 {
720720
goto done
721721
}
722+
runtime.Gosched()
722723
}
723724
t.Fatal("failed to trigger concurrent GC")
724725
done:

0 commit comments

Comments
 (0)