mirror of
https://github.com/kubernetes/client-go.git
synced 2025-07-18 09:11:10 +00:00
unify worker num to workers
Kubernetes-commit: e6df935fd30c56a8ece0da6152c60fc725d942b7
This commit is contained in:
parent
3dc80a3333
commit
a9a86ad864
@ -116,7 +116,7 @@ func (c *Controller) handleErr(err error, key interface{}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Run begins watching and syncing.
|
// 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()
|
defer runtime.HandleCrash()
|
||||||
|
|
||||||
// Let the workers stop when we are done
|
// Let the workers stop when we are done
|
||||||
@ -131,7 +131,7 @@ func (c *Controller) Run(threadiness int, stopCh chan struct{}) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
for i := 0; i < threadiness; i++ {
|
for i := 0; i < workers; i++ {
|
||||||
go wait.Until(c.runWorker, time.Second, stopCh)
|
go wait.Until(c.runWorker, time.Second, stopCh)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user