[#BloombergLP-bdlcc-BoundedQueue-waitUntilEmpty]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::xref:BloombergLP/bdlcc/BoundedQueue.adoc[BoundedQueue]::waitUntilEmpty
:relfileprefix: ../../../
:mrdocs:

Block until all the elements in this queue are removed&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
waitUntilEmpty() const;
----

== Description

Return 0 on success, and a non&hyphen;zero value otherwise&period; Specifically, return `e&lowbar;SUCCESS` on success, `e&lowbar;DISABLED` if &grave;!isEmpty() &amp;&amp; isPopFrontDisabled()&grave;&period; A blocked thread waiting for the queue to empty will return `e&lowbar;DISABLED` if `disablePopFront` is invoked&period;

== Return Value

0 on success, and a non&hyphen;zero value otherwise


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