mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-07 10:00:15 +00:00
client-go workqueue: add optional logger
NewTypedDelayingQueueWithConfig spawns a goroutine, but apparently shutdown is already handled somehow. Therefore only the option to set a logger gets added to the Config struct. The problem then becomes that developers might forget to set that logger. logcheck can't detect that. For now, all in-tree users get updated immediately. Kubernetes-commit: f20eb2e7c16a9b28e69fd0bba2000e7166d68f29
This commit is contained in:
committed by
Kubernetes Publisher
parent
7faeb317c7
commit
a96aa53864
@@ -74,7 +74,7 @@ func ParallelizeUntil(ctx context.Context, workers, pieces int, doWorkPiece DoWo
|
||||
wg.Add(workers)
|
||||
for i := 0; i < workers; i++ {
|
||||
go func() {
|
||||
defer utilruntime.HandleCrash()
|
||||
defer utilruntime.HandleCrashWithContext(ctx)
|
||||
defer wg.Done()
|
||||
for chunk := range toProcess {
|
||||
start := chunk * chunkSize
|
||||
|
Reference in New Issue
Block a user