MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / start

Method start

sqlchain/observer/worker.go:130–143  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

128}
129
130func (w *subscribeWorker) start() {
131 w.l.Lock()
132 defer w.l.Unlock()
133
134 // update subscription status to database
135 _ = w.s.saveSubscriptionStatus(w.dbID, w.getHead())
136
137 if w.isStopped() {
138 w.stopCh = make(chan struct{})
139 w.wg = new(sync.WaitGroup)
140 w.wg.Add(1)
141 go w.run()
142 }
143}
144
145func (w *subscribeWorker) getHead() int32 {
146 return atomic.LoadInt32(&w.head)

Callers 1

resetMethod · 0.95

Calls 5

getHeadMethod · 0.95
isStoppedMethod · 0.95
runMethod · 0.95
AddMethod · 0.45

Tested by

no test coverage detected