[#BloombergLP-bdlcc-MultipriorityQueue-tryPopFront]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::xref:BloombergLP/bdlcc/MultipriorityQueue.adoc[MultipriorityQueue]::tryPopFront
:relfileprefix: ../../../
:mrdocs:

Attempt to remove the most urgent item from this queue immediately&period;

== Synopsis

Declared in `&lt;bdlcc&lowbar;multipriorityqueue&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
tryPopFront(
    TYPE* item,
    int* itemPriority = 0);
----

== Description

Attempt to remove (immediately) the least&hyphen;recently added item having the most urgent priority (lowest value) from this multi&hyphen;priority queue&period; On success, load the value of the popped item into the specified `item`&semi; if the optionally specified `itemPriority` is non&hyphen;null, load the priority of the popped item into `itemPriority`&semi; and return 0&period; Otherwise, leave `item` and `itemPriority` unmodified, and return a non&hyphen;zero value indicating that this queue was empty&period; The behavior is undefined unless `item` is non&hyphen;null&period; Note this is unaffected by the enabled &sol; disabled state of the queue&period;

== Return Value

0 on success, and a non&hyphen;zero value if the queue is empty

== Parameters

[cols="1,4"]
|===
| Name| Description
| *item*
| receives the removed item
| *itemPriority*
| if non&hyphen;null, receives the removed item&apos;s priority
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
