make sure unlock safe even if listeners panic (#383)
* make sure unlock safe even if listeners panic * fix #378 * fix #378
This commit is contained in:
@@ -4,10 +4,12 @@ package proc
|
||||
|
||||
import "time"
|
||||
|
||||
// AddShutdownListener returns fn itself on windows, lets callers call fn on their own.
|
||||
func AddShutdownListener(fn func()) func() {
|
||||
return fn
|
||||
}
|
||||
|
||||
// AddWrapUpListener returns fn itself on windows, lets callers call fn on their own.
|
||||
func AddWrapUpListener(fn func()) func() {
|
||||
return fn
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user