MCPcopy Index your code
hub / github.com/coder/coder / thresholdChan

Method thresholdChan

coderd/x/chatd/chatdebug/service.go:186–190  ·  view source on GitHub ↗

thresholdChan returns the current threshold-change notification channel. Heartbeat goroutines select on this to detect runtime stale-threshold updates.

()

Source from the content-addressed store, hash-verified

184// channel. Heartbeat goroutines select on this to detect runtime
185// stale-threshold updates.
186func (s *Service) thresholdChan() <-chan struct{} {
187 s.thresholdMu.Lock()
188 defer s.thresholdMu.Unlock()
189 return s.thresholdChanged
190}
191
192// staleThreshold returns the current stale timeout.
193func (s *Service) staleThreshold() time.Duration {

Callers 1

launchHeartbeatFunction · 0.80

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected