NumWaiting returns the number of goroutines waiting for waiting for updates. Used for metrics and testing.
()
| 99 | // NumWaiting returns the number of goroutines waiting for waiting for updates. |
| 100 | // Used for metrics and testing. |
| 101 | func (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 |