MCPcopy
hub / github.com/cortesi/devd / flushLoop

Method flushLoop

reverseproxy/reverseproxy.go:239–255  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

237}
238
239func (m *maxLatencyWriter) flushLoop() {
240 t := time.NewTicker(m.latency)
241 defer t.Stop()
242 for {
243 select {
244 case <-m.done:
245 if onExitFlushLoop != nil {
246 onExitFlushLoop()
247 }
248 return
249 case <-t.C:
250 m.Lock()
251 m.dst.Flush()
252 m.Unlock()
253 }
254 }
255}
256
257func (m *maxLatencyWriter) stop() { m.done <- true }

Callers 1

copyResponseMethod · 0.95

Calls 1

FlushMethod · 0.80

Tested by

no test coverage detected