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

Function newStreamSilenceGuard

coderd/x/chatd/chatloop/chatloop.go:808–823  ·  view source on GitHub ↗
(
	clock quartz.Clock,
	timeout time.Duration,
	cancel context.CancelCauseFunc,
)

Source from the content-addressed store, hash-verified

806}
807
808func newStreamSilenceGuard(
809 clock quartz.Clock,
810 timeout time.Duration,
811 cancel context.CancelCauseFunc,
812) *streamSilenceGuard {
813 guard := &streamSilenceGuard{
814 cancel: cancel,
815 timeout: timeout,
816 }
817 guard.timer = clock.AfterFunc(
818 timeout,
819 guard.onTimeout,
820 streamSilenceGuardTimerTag,
821 )
822 return guard
823}
824
825func (g *streamSilenceGuard) settle() bool {
826 g.mu.Lock()

Calls

no outgoing calls