MCPcopy Create free account
hub / github.com/apache/pulsar-client-go / dequeue

Method dequeue

pulsar/internal/blocking_queue.go:187–199  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

185}
186
187func (bq *blockingQueue) dequeue() interface{} {
188 item := bq.items[bq.headIdx]
189 bq.items[bq.headIdx] = nil
190
191 bq.headIdx++
192 if bq.headIdx == len(bq.items) {
193 bq.headIdx = 0
194 }
195
196 bq.size--
197 bq.isNotFull.Signal()
198 return item
199}
200
201func (bq *blockingQueue) Size() int {
202 bq.mutex.Lock()

Callers 3

TakeMethod · 0.95
PollMethod · 0.95
CompareAndPollMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected