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

Method stopPushDispatch

internal/server/push_dispatch.go:300–309  ·  view source on GitHub ↗

stopPushDispatch signals the loop to exit. Safe when it never started.

()

Source from the content-addressed store, hash-verified

298
299// stopPushDispatch signals the loop to exit. Safe when it never started.
300func (s *Server) stopPushDispatch() {
301 d := &s.pushDispatch
302 d.mu.Lock()
303 defer d.mu.Unlock()
304 if !d.running {
305 return
306 }
307 close(d.stop)
308 d.running = false
309}
310
311// pushUnit is the rows of one (user, item) group after gating, which become
312// one push per live device. nid and kind are the newest row's.

Calls 3

LockMethod · 0.80
UnlockMethod · 0.80
closeFunction · 0.50