You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: keeper.go
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -33,9 +33,9 @@ type HoldToken interface {
33
33
// DeadlineContext is the context that will be canceled when the MaxHoldTime is exceeded during the shutdown process.
34
34
DeadlineContext() context.Context
35
35
36
-
// GoListenThenDo is a shortcut that starts a goroutine to listen for the shutdown event, when the shutdown event is triggered, it runs the provided function. After the function execution is completed, the HoldToken will be released.
36
+
// DoOnShutdown is a shortcut that starts a goroutine to listen for the shutdown event, when the shutdown event is triggered, it runs the provided function. After the function execution is completed, the HoldToken will be released.
37
37
// the context that is passed to the function is the one returned by DeadlineContext method.
38
-
GoListenThenDo(func(ctx context.Context))
38
+
DoOnShutdown(func(ctx context.Context))
39
39
40
40
// GoRun is a shortcut that starts a goroutine and run the provided function immediately. After the function execution is completed, the HoldToken will be released.
0 commit comments