(stop <-chan struct{})
| 227 | } |
| 228 | |
| 229 | func (w *WorkerPool) tryHandleRequestQueue(stop <-chan struct{}) { |
| 230 | t := time.NewTicker(time.Second * 5) |
| 231 | for { |
| 232 | select { |
| 233 | case <-t.C: |
| 234 | klog.V(4).InfoS("time ticker trigger") |
| 235 | w.handleRequestQueue() |
| 236 | case <-w.matchRequestSignal: |
| 237 | klog.InfoS("received request signal") |
| 238 | w.handleRequestQueue() |
| 239 | case <-stop: |
| 240 | return |
| 241 | } |
| 242 | } |
| 243 | } |
| 244 | |
| 245 | func (w *WorkerPool) handleRequestQueue() { |
| 246 | w.Lock() |