fix golint issues in core/proc (#502)

This commit is contained in:
Kevin Wan
2021-02-22 10:07:39 +08:00
committed by GitHub
parent 221f923fae
commit d84e3d4b53
4 changed files with 10 additions and 0 deletions

View File

@@ -24,14 +24,19 @@ var (
delayTimeBeforeForceQuit = waitTime
)
// AddShutdownListener adds fn as a shutdown listener.
// The returned func can be used to wait for fn getting called.
func AddShutdownListener(fn func()) (waitForCalled func()) {
return shutdownListeners.addListener(fn)
}
// AddWrapUpListener adds fn as a wrap up listener.
// The returned func can be used to wait for fn getting called.
func AddWrapUpListener(fn func()) (waitForCalled func()) {
return wrapUpListeners.addListener(fn)
}
// SetTimeToForceQuit sets the waiting time before force quitting.
func SetTimeToForceQuit(duration time.Duration) {
delayTimeBeforeForceQuit = duration
}