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

Try to remove the first item into `buffer` without blocking&period;

== Synopsis

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

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

== Description

If this queue is non&hyphen;empty, remove the first item, load that item into the specified `buffer`, and return 0 indicating success&period; If this queue is empty, return a non&hyphen;zero value with no effect on `buffer` or the state of this queue&period; This method never blocks&period;

== Return Value

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

== Parameters

[cols="1,4"]
|===
| Name| Description
| *buffer*
| receives the removed item on success
|===


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