BloombergLP::bdlcc::Queue::timedPopFront

Remove the first item into buffer, waiting until timeout if empty.

Synopsis

Declared in <bdlcc_queue.h>

int
timedPopFront(
    TYPE* buffer,
    bsls::TimeInterval const& timeout);

Description

Remove the first item in this queue and load that item value into the specified buffer. If this queue is empty, block until an item is available or until the specified timeout (expressed as the ABSOLUTE time from 00:00:00 UTC, January 1, 1970) expires. Return 0 on success, and a non-zero value if the call timed out before an item was available.

Return Value

0 on success, and a non-zero value if the call timed out

Parameters

NameDescription
bufferreceives the removed item
timeoutabsolute time at which to stop waiting