File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,11 @@ func (l *Limit[T]) Timeout(ctx context.Context, timeout time.Duration) (Limited[
131131
132132// SetForeverMessaging returns a modified Limit that changes the behavior of Forever() so that
133133// it will call stuckCallback() (if set) after waiting for stuckTimeout duration. If past that duration,
134- // and it will call unstuckCallback() (if set) when it finally gets a limit.
134+ // and it will call unstuckCallback() (if set) when it finally gets a limit or if the context
135+ // is cancelled.
136+ //
137+ // The anticipated use of the callbacks is logging. They don't return error and if they panic,
138+ // it won't be caught by the simultaneous package.
135139func (l Limit [T ]) SetForeverMessaging (stuckTimeout time.Duration , stuckCallback func (context.Context ), unstuckCallback func (context.Context )) * Limit [T ] {
136140 l .stuckTimeout = stuckTimeout
137141 l .stuckCallback = stuckCallback
You can’t perform that action at this time.
0 commit comments