[#BloombergLP-bdlcc-FixedQueue-2constructor]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::xref:BloombergLP/bdlcc/FixedQueue.adoc[FixedQueue]::FixedQueue
:relfileprefix: ../../../
:mrdocs:

Create a thread&hyphen;aware lock&hyphen;free queue of the specified `capacity`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
FixedQueue(
    std::size&lowbar;t capacity,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

== Description

Create a thread&hyphen;aware lock&hyphen;free queue having the specified `capacity`&period; Optionally specify a `basicAllocator` used to supply memory&period; If `basicAllocator` is 0, the currently installed default allocator is used&period; The behavior is undefined unless `0 &lt; capacity` and `capacity &lt;&equals; bdlcc&colon;&colon;FixedQueueIndexManager&colon;&colon;k&lowbar;MAX&lowbar;CAPACITY`&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *capacity*
| maximum number of elements the queue can hold
| *basicAllocator*
| allocator used to supply memory
|===


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