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

Method Close

coderd/x/chatd/chatd.go:9869–9878  ·  view source on GitHub ↗

Close stops the processor and waits for it to finish.

()

Source from the content-addressed store, hash-verified

9867
9868// Close stops the processor and waits for it to finish.
9869func (p *Server) Close() error {
9870 if unsub := p.configCacheUnsubscribe; unsub != nil {
9871 p.configCacheUnsubscribe = nil
9872 unsub()
9873 }
9874 p.cancel()
9875 p.wg.Wait()
9876 p.drainInflight()
9877 return nil
9878}
9879
9880// drainInflight waits for all in-flight operations to complete.
9881// It acquires inflightMu to prevent processOnce from spawning

Callers 15

TestExternalAuthDeviceFunction · 0.95
TestExternalAuthCallbackFunction · 0.95
TestWatchChatGitFunction · 0.95
TestWatchAgentContainersFunction · 0.95
TestTasksFunction · 0.95
TestConcurrencyLimitFunction · 0.95
TestPrometheusFunction · 0.95

Calls 3

drainInflightMethod · 0.95
WaitMethod · 0.65
cancelMethod · 0.45

Tested by 15

TestExternalAuthDeviceFunction · 0.76
TestExternalAuthCallbackFunction · 0.76
TestWatchChatGitFunction · 0.76
TestWatchAgentContainersFunction · 0.76
TestTasksFunction · 0.76
TestConcurrencyLimitFunction · 0.76
TestPrometheusFunction · 0.76