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

Function WithReaperStop

agent/reaper/reaper.go:50–54  ·  view source on GitHub ↗

WithReaperStop sets a channel that, when closed, stops the reaper goroutine. Callers that invoke ForkReap more than once in the same process (e.g. tests) should use this to prevent goroutine accumulation.

(ch chan struct{})

Source from the content-addressed store, hash-verified

48// same process (e.g. tests) should use this to prevent goroutine
49// accumulation.
50func WithReaperStop(ch chan struct{}) Option {
51 return func(o *options) {
52 o.ReaperStop = ch
53 }
54}
55
56// WithReaperStopped sets a channel that is closed after the
57// reaper goroutine has fully exited.

Callers 1

withDoneFunction · 0.92

Calls

no outgoing calls

Tested by 1

withDoneFunction · 0.74