Atomically remove the top item from this queue.

Synopsis

Declared in <bdlcc_timequeue.h>

int
popFront(
    TimeQueueItem<DATA>* buffer = 0,
    int* newLength = 0,
    bsls::TimeInterval* newMinTime = 0);

Description

Atomically remove the top item from this queue, and optionally load into the optionally specified buffer the time and associated data of the item removed. Optionally load into the optionally specified newLength, the number of items remaining in the queue. Optionally load into the optionally specified newMinTime the new lowest time in this queue. Return 0 on success, and a non‐zero value if there are no items in the queue. Note that if DATA follows the bdema allocator model, the allocator of the buffer is used to supply memory.

Return Value

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

Parameters

Name

Description

buffer

if non‐null, receives the removed item

newLength

if non‐null, receives the new queue length

newMinTime

if non‐null, receives the new minimum time

Created with MrDocs