]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/runtime/trace2cpu.go
runtime: prevent send on closed channel in wakeableSleep
[gostls13.git] / src / runtime / trace2cpu.go
index 4c9bad434c54695e47a6d155f1906752e88e5b24..a33c0b6b6da08e3b866550cefdeb963ffe24d5f2 100644 (file)
@@ -37,7 +37,7 @@ func traceStartReadCPU() {
                throw("traceStartReadCPU called with trace disabled")
        }
        // Spin up the logger goroutine.
-       trace.cpuSleep.init()
+       trace.cpuSleep = newWakeableSleep()
        done := make(chan struct{}, 1)
        go func() {
                for traceEnabled() {