BloombergLP::bdlcc::Queue::tryPopFront

tryPopFront overloads

Synopses

Declared in <bdlcc_queue.h>

Remove up to maxNumItems from the front of this queue.

void
tryPopFront(int maxNumItems);
» more...

Try to remove the first item into buffer without blocking.

int
tryPopFront(TYPE* buffer);
» more...

Same as the preceding overload, appending removed items to buffer.

void
tryPopFront(
    int maxNumItems,
    bsl::vector<TYPE>* buffer);
» more...

Same as the preceding overload, appending removed items to buffer.

void
tryPopFront(
    int maxNumItems,
    std::pmr::vector<TYPE>* buffer);
» more...

Same as the preceding overload, appending removed items to buffer.

void
tryPopFront(
    int maxNumItems,
    std::vector<TYPE>* buffer);
» more...

Return Value

0 on success, and a non-zero value if the queue is empty

Parameters

NameDescription
maxNumItemsmaximum number of items to remove
bufferreceives the removed item on success