BloombergLP::bdlcc::Queue::tryPopFront

Try to remove the first item into buffer without blocking.

Synopsis

Declared in <bdlcc_queue.h>

int
tryPopFront(TYPE* buffer);

Description

If this queue is non-empty, remove the first item, load that item into the specified buffer, and return 0 indicating success. If this queue is empty, return a non-zero value with no effect on buffer or the state of this queue. This method never blocks.

Return Value

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

Parameters

NameDescription
bufferreceives the removed item on success