MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / size_approx

Method size_approx

deps/concurrentqueue/concurrentqueue.h:1717–1722  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1715 inline ProducerBase* next_prod() const { return static_cast<ProducerBase*>(next); }
1716
1717 inline size_t size_approx() const
1718 {
1719 auto tail = tailIndex.load(std::memory_order_relaxed);
1720 auto head = headIndex.load(std::memory_order_relaxed);
1721 return details::circular_less_than(head, tail) ? static_cast<size_t>(tail - head) : 0;
1722 }
1723
1724 inline index_t getTail() const { return tailIndex.load(std::memory_order_relaxed); }
1725 protected:

Callers 6

throttleMethod · 0.45
endWorkMethod · 0.45
loadWorkerThreadMainMethod · 0.45
try_dequeueMethod · 0.45
size_approxMethod · 0.45
getForMethod · 0.45

Calls 1

circular_less_thanFunction · 0.85

Tested by

no test coverage detected