PushDispatchApplied reads the dispatcher's timings, filling defaults for any unset one. Read-only; startup's wiring test reads it to prove the knobs reached the dispatcher, and the interval before Start (TASK-3939 part C, decision 77a8fae7). A test-only seam, read at single-threaded startup: it take
()
| 290 | // takes the lock twice (resolve, then startedInterval), so a concurrent |
| 291 | // reconfigure could give a mixed snapshot. |
| 292 | func (s *Server) PushDispatchApplied() PushDispatchApplied { |
| 293 | cur := s.resolvePushDispatchSettings() |
| 294 | s.pushDispatch.mu.Lock() |
| 295 | defer s.pushDispatch.mu.Unlock() |
| 296 | return PushDispatchApplied{cur.interval, cur.settle, cur.lease, cur.leaseMargin, s.pushDispatch.startedInterval} |
| 297 | } |
| 298 | |
| 299 | // stopPushDispatch signals the loop to exit. Safe when it never started. |
| 300 | func (s *Server) stopPushDispatch() { |