[#BloombergLP-bdlcc-SingleProducerQueue] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::SingleProducerQueue :relfileprefix: ../../ :mrdocs: This class provides a thread‐safe unbounded queue of values that assumes a single producer thread. == Synopsis Declared in `<bdlcc_singleproducerqueue.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPE> class SingleProducerQueue; ---- == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlcc/SingleProducerQueue/value_type.adoc[`value_type`] | The type for elements stored in this queue. |=== == Enums [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlcc/SingleProducerQueue/_04enum.adoc[`Unnamed enum`] | Status codes returned by queue operations. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlcc/SingleProducerQueue/2constructor-0f.adoc[`SingleProducerQueue`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bdlcc/SingleProducerQueue/allocator.adoc[`allocator`] | Return the allocator used by this object to supply memory. | xref:BloombergLP/bdlcc/SingleProducerQueue/disablePopFront.adoc[`disablePopFront`] | Disable dequeueing from this queue. | xref:BloombergLP/bdlcc/SingleProducerQueue/disablePushBack.adoc[`disablePushBack`] | Disable enqueueing into this queue. | xref:BloombergLP/bdlcc/SingleProducerQueue/enablePopFront.adoc[`enablePopFront`] | Enable dequeueing. If the queue is not dequeue disabled, this call has no effect. | xref:BloombergLP/bdlcc/SingleProducerQueue/enablePushBack.adoc[`enablePushBack`] | Enable queuing. If the queue is not enqueue disabled, this call has no effect. | xref:BloombergLP/bdlcc/SingleProducerQueue/isEmpty.adoc[`isEmpty`] | Return `true` if this queue is empty (has no elements), or `false` otherwise. | xref:BloombergLP/bdlcc/SingleProducerQueue/isFull.adoc[`isFull`] | Return `true` if this queue is full (has no available capacity), or `false` otherwise. Note that for unbounded queues, this method always returns `false`. | xref:BloombergLP/bdlcc/SingleProducerQueue/isPopFrontDisabled.adoc[`isPopFrontDisabled`] | Return `true` if this queue is dequeue disabled, and `false` otherwise. Note that the queue is created in the "dequeue enabled" state. | xref:BloombergLP/bdlcc/SingleProducerQueue/isPushBackDisabled.adoc[`isPushBackDisabled`] | Return `true` if this queue is enqueue disabled, and `false` otherwise. Note that the queue is created in the "enqueue enabled" state. | xref:BloombergLP/bdlcc/SingleProducerQueue/numElements.adoc[`numElements`] | Returns the number of elements currently in this queue. | xref:BloombergLP/bdlcc/SingleProducerQueue/popFront.adoc[`popFront`] | Remove the front element and load it into the specified `value`. | xref:BloombergLP/bdlcc/SingleProducerQueue/pushBack-0d.adoc[`pushBack`] | `pushBack` overloads | xref:BloombergLP/bdlcc/SingleProducerQueue/removeAll.adoc[`removeAll`] | Remove all items currently in this queue. | xref:BloombergLP/bdlcc/SingleProducerQueue/tryPopFront.adoc[`tryPopFront`] | Attempt to remove the front element without blocking. | xref:BloombergLP/bdlcc/SingleProducerQueue/tryPushBack-09.adoc[`tryPushBack`] | `tryPushBack` overloads | xref:BloombergLP/bdlcc/SingleProducerQueue/waitUntilEmpty.adoc[`waitUntilEmpty`] | Block until all elements in this queue are removed. | xref:BloombergLP/bdlcc/SingleProducerQueue/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration<SingleProducerQueue, UsesBslmaAllocator>`] | Declare that this type uses a `bslma` allocator. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#