mirror of
https://github.com/golang/go
synced 2024-11-22 04:24:39 -07:00
time: fix test hang
R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5374083
This commit is contained in:
parent
3811a44103
commit
ba98a7ee5e
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user