MCPcopy Index your code
hub / github.com/livekit/livekit / Enqueue

Method Enqueue

pkg/utils/opsqueue.go:118–133  ·  view source on GitHub ↗
(op T)

Source from the content-addressed store, hash-verified

116}
117
118func (oq *opsQueueBase[T]) Enqueue(op T) {
119 oq.lock.Lock()
120 defer oq.lock.Unlock()
121
122 if oq.isStopped {
123 return
124 }
125
126 oq.ops.PushBack(op)
127 if oq.ops.Len() == 1 {
128 select {
129 case oq.wake <- struct{}{}:
130 default:
131 }
132 }
133}
134
135func (oq *opsQueueBase[T]) process() {
136 defer close(oq.doneChan)

Callers

nothing calls this directly

Calls 1

LenMethod · 0.45

Tested by

no test coverage detected