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

Method runInBackground

modules/livestore/live_store_background.go:67–80  ·  view source on GitHub ↗
(fn func())

Source from the content-addressed store, hash-verified

65}
66
67func (s *LiveStore) runInBackground(fn func()) {
68 s.wg.Add(1)
69 go func() {
70 defer s.wg.Done()
71
72 select {
73 case <-s.startupComplete:
74 case <-s.ctx.Done():
75 return
76 }
77
78 fn()
79 }()
80}
81
82func (s *LiveStore) globalCompleteLoop(idx int) {
83 level.Info(s.logger).Log("msg", "starting completing loop", "index", idx)

Callers 2

startingMethod · 0.95
getOrCreateInstanceMethod · 0.95

Calls 2

AddMethod · 0.65
DoneMethod · 0.65

Tested by

no test coverage detected