aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/testdata
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/testdata')
-rw-r--r--src/runtime/testdata/testprogcgo/aprof.go18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/runtime/testdata/testprogcgo/aprof.go b/src/runtime/testdata/testprogcgo/aprof.go
index b4b71f2861..aabca9e1eb 100644
--- a/src/runtime/testdata/testprogcgo/aprof.go
+++ b/src/runtime/testdata/testprogcgo/aprof.go
@@ -30,19 +30,17 @@ func GoNop() {}
func CgoCCodeSIGPROF() {
c := make(chan bool)
go func() {
- for {
- <-c
- start := time.Now()
- for i := 0; i < 1e7; i++ {
- if i%1000 == 0 {
- if time.Since(start) > time.Second {
- break
- }
+ <-c
+ start := time.Now()
+ for i := 0; i < 1e7; i++ {
+ if i%1000 == 0 {
+ if time.Since(start) > time.Second {
+ break
}
- C.GoNop()
}
- c <- true
+ C.GoNop()
}
+ c <- true
}()
var buf bytes.Buffer