(stopCh <-chan struct{})
| 207 | } |
| 208 | |
| 209 | func (c *Controller) worker(stopCh <-chan struct{}) { |
| 210 | for c.processNextItem() { |
| 211 | select { |
| 212 | case <-stopCh: |
| 213 | return |
| 214 | default: |
| 215 | } |
| 216 | } |
| 217 | } |
| 218 | |
| 219 | func (c *Controller) Run(workers int, stopCh <-chan struct{}) { |
| 220 | defer utilruntime.HandleCrash() |