diff options
Diffstat (limited to 'src/runtime/testdata/testprog/preempt.go')
| -rw-r--r-- | src/runtime/testdata/testprog/preempt.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/runtime/testdata/testprog/preempt.go b/src/runtime/testdata/testprog/preempt.go index 1c74d0e435..eb9f59053c 100644 --- a/src/runtime/testdata/testprog/preempt.go +++ b/src/runtime/testdata/testprog/preempt.go @@ -20,6 +20,9 @@ func AsyncPreempt() { runtime.GOMAXPROCS(1) // Disable GC so we have complete control of what we're testing. debug.SetGCPercent(-1) + // Out of an abundance of caution, also make sure that there are + // no GCs actively in progress. + runtime.GC() // Start a goroutine with no sync safe-points. var ready, ready2 uint32 |
