MCPcopy Create free account
hub / github.com/cameron314/readerwriterqueue / max_capacity

Method max_capacity

readerwriterqueue.h:961–963  ·  view source on GitHub ↗

Returns the total number of items that could be enqueued without incurring an allocation when this queue is empty. Safe to call from both the producer and consumer threads. NOTE: The actual capacity during usage may be different depending on the consumer. If the consumer is removing elements concurrently, the producer cannot add to the block the consumer is removing from until it's completely emp

Source from the content-addressed store, hash-verified

959 // the case where the producer was writing to the same block the consumer was
960 // reading from the whole time.
961 AE_FORCEINLINE size_t max_capacity() const {
962 return inner.max_capacity();
963 }
964
965private:
966 // Disable copying & assignment

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected