MCPcopy Create free account
hub / github.com/daodst/chat / NumWaiting

Method NumWaiting

syncapi/notifier/userstream.go:101–105  ·  view source on GitHub ↗

NumWaiting returns the number of goroutines waiting for waiting for updates. Used for metrics and testing.

()

Source from the content-addressed store, hash-verified

99// NumWaiting returns the number of goroutines waiting for waiting for updates.
100// Used for metrics and testing.
101func (s *UserDeviceStream) NumWaiting() uint {
102 s.lock.Lock()
103 defer s.lock.Unlock()
104 return s.numWaiting
105}
106
107// TimeOfLastNonEmpty returns the last time that the number of waiting listeners
108// was non-empty, may be time.Now() if number of waiting listeners is currently

Callers 2

waitForBlockingFunction · 0.80

Calls 2

LockMethod · 0.80
UnlockMethod · 0.80

Tested by 2

waitForBlockingFunction · 0.64