MCPcopy
hub / github.com/grafana/tempo / writeBackLoop

Method writeBackLoop

pkg/cache/background.go:111–127  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

109}
110
111func (c *backgroundCache) writeBackLoop() {
112 defer c.wg.Done()
113
114 for {
115 select {
116 case bgWrite, ok := <-c.bgWrites:
117 if !ok {
118 return
119 }
120 c.queueLength.Sub(float64(len(bgWrite.keys)))
121 c.Cache.Store(context.Background(), bgWrite.keys, bgWrite.bufs)
122
123 case <-c.quit:
124 return
125 }
126 }
127}

Callers 1

NewBackgroundFunction · 0.95

Calls 2

DoneMethod · 0.65
StoreMethod · 0.65

Tested by

no test coverage detected