Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StopFlushDaemon: document flushing on shutdown #314

Merged
merged 1 commit into from Mar 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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