We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b6c5897 commit 5281cfaCopy full SHA for 5281cfa
pkg/internal/controller/controller.go
@@ -197,9 +197,16 @@ func (c *Controller[request]) Start(ctx context.Context) error {
197
for i := 0; i < c.MaxConcurrentReconciles; i++ {
198
go func() {
199
defer wg.Done()
200
+ queueCtx := context.WithoutCancel(ctx)
201
// Run a worker thread that just dequeues items, processes them, and marks them done.
202
// It enforces that the reconcileHandler is never invoked concurrently with the same object.
- for c.processNextWorkItem(ctx) {
203
+ Process:
204
+ for c.processNextWorkItem(queueCtx) {
205
+ select {
206
+ case <-ctx.Done():
207
+ break Process
208
+ default:
209
+ }
210
}
211
}()
212
0 commit comments