MCPcopy
hub / github.com/livekit/livekit / process

Method process

pkg/utils/opsqueue.go:135–157  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

133}
134
135func (oq *opsQueueBase[T]) process() {
136 defer close(oq.doneChan)
137
138 for {
139 <-oq.wake
140 for {
141 oq.lock.Lock()
142 if oq.isStopped && (!oq.params.FlushOnStop || oq.ops.Len() == 0) {
143 oq.lock.Unlock()
144 return
145 }
146
147 if oq.ops.Len() == 0 {
148 oq.lock.Unlock()
149 break
150 }
151 op := oq.ops.PopFront()
152 oq.lock.Unlock()
153
154 op.run()
155 }
156 }
157}

Callers 1

StartMethod · 0.95

Calls 2

runMethod · 0.65
LenMethod · 0.45

Tested by

no test coverage detected