Try to remove the last item into buffer without blocking.

Synopsis

Declared in <bdlcc_queue.h>

int
tryPopBack(TYPE* buffer);

Description

If this queue is non‐empty, remove the last 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

Name

Description

buffer

receives the removed item on success

Created with MrDocs