MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / PushDispatchApplied

Method PushDispatchApplied

internal/server/push_dispatch.go:292–297  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

290// takes the lock twice (resolve, then startedInterval), so a concurrent
291// reconfigure could give a mixed snapshot.
292func (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.
300func (s *Server) stopPushDispatch() {

Calls 3

LockMethod · 0.80
UnlockMethod · 0.80