Skip to content

Commit

Permalink
Merge pull request #314 from pohly/stop-flush-daemon-clarification
Browse files Browse the repository at this point in the history
StopFlushDaemon: document flushing on shutdown
  • Loading branch information
k8s-ci-robot committed Mar 21, 2022
2 parents d07cbbf + 47f254f commit c697110
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions klog.go
Expand Up @@ -1077,9 +1077,9 @@ func (f *flushDaemon) isRunning() bool {
return f.stopC != nil
}

// StopFlushDaemon stops the flush daemon, if running.
// StopFlushDaemon stops the flush daemon, if running, and flushes once.
// This prevents klog from leaking goroutines on shutdown. After stopping
// the daemon, you can still manually flush buffers by calling Flush().
// the daemon, you can still manually flush buffers again by calling Flush().
func StopFlushDaemon() {
logging.flushD.stop()
}
Expand Down

0 comments on commit c697110

Please sign in to comment.