Merge pull request #104231 from astraw99/fix_unified_workers

Unify controller worker num param `threadiness` to `workers`

Kubernetes-commit: fca3175df7a453c24eec3c11b632090c49472c9d
This commit is contained in:
Kubernetes Publisher 2021-08-27 09:34:05 -07:00
commit b350fc31ce

View File

@ -116,7 +116,7 @@ func (c *Controller) handleErr(err error, key interface{}) {
}
// Run begins watching and syncing.
func (c *Controller) Run(threadiness int, stopCh chan struct{}) {
func (c *Controller) Run(workers int, stopCh chan struct{}) {
defer runtime.HandleCrash()
// Let the workers stop when we are done
@ -131,7 +131,7 @@ func (c *Controller) Run(threadiness int, stopCh chan struct{}) {
return
}
for i := 0; i < threadiness; i++ {
for i := 0; i < workers; i++ {
go wait.Until(c.runWorker, time.Second, stopCh)
}