BloombergLP::bdlcc::SingleProducerQueue::tryPopFront

Attempt to remove the front element without blocking.

Synopsis

Declared in <bdlcc_singleproducerqueue.h>

int
tryPopFront(TYPE* value);

Description

Attempt to remove the element from the front of this queue without blocking, and, if successful, load the specified value with the removed element. Return 0 on success, and a non-zero value otherwise. Specifically, return e_DISABLED if isPopFrontDisabled(), and e_EMPTY if !isPopFrontDisabled() and the queue was empty. On failure, value is not changed.

Return Value

0 on success, and a non-zero value otherwise

Parameters

NameDescription
valuereceives the removed element