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

runtime: remove useless loop from CgoCCodeSIGPROF test program

I verified that the test fails if I undo the change that it tests for.

Updates #14732.

Change-Id: Ib30352580236adefae946450ddd6cd65a62b7cdf
Reviewed-on: https://go-review.googlesource.com/24151
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarMikio Hara <mikioh.mikioh@gmail.com>
parent d78d0de4
...@@ -30,19 +30,17 @@ func GoNop() {} ...@@ -30,19 +30,17 @@ func GoNop() {}
func CgoCCodeSIGPROF() { func CgoCCodeSIGPROF() {
c := make(chan bool) c := make(chan bool)
go func() { go func() {
for { <-c
<-c start := time.Now()
start := time.Now() for i := 0; i < 1e7; i++ {
for i := 0; i < 1e7; i++ { if i%1000 == 0 {
if i%1000 == 0 { if time.Since(start) > time.Second {
if time.Since(start) > time.Second { break
break
}
} }
C.GoNop()
} }
c <- true C.GoNop()
} }
c <- true
}() }()
var buf bytes.Buffer var buf bytes.Buffer
......
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