Commit ba98a7ee authored by Dmitriy Vyukov's avatar Dmitriy Vyukov

time: fix test hang

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5374083
parent 3811a441
......@@ -54,6 +54,9 @@ func TestAfterStress(t *testing.T) {
go func() {
for atomic.LoadUint32(&stop) == 0 {
runtime.GC()
// Need to yield, because otherwise
// the main goroutine will never set the stop flag.
runtime.Gosched()
}
}()
c := Tick(1)
......
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