This class provides a thread‐aware, lock‐free, fixed‐size queue of values.

Synopsis

Declared in <bdlcc_fixedqueue.h>

template<class TYPE>
class FixedQueue;

Member Functions

Name

Description

FixedQueue [constructor]

Create a thread‐aware lock‐free queue of the specified capacity.

~FixedQueue [destructor]

Destroy this object.

capacity

Return the maximum number of elements that may be stored in this queue.

disable

Disable this queue.

enable

Enable queuing. If the queue is not disabled, this call has no effect.

isEmpty

Return true if this queue is empty (has no elements), or false otherwise.

isEnabled

Return true if this queue is enabled, and false otherwise. Note that the queue is created in the "enabled" state.

isFull

Return true if this queue is full (when the number of elements currently in this queue equals its capacity), or false otherwise.

length

DEPRECATED: Use numElements() instead.

numElements

Returns the number of elements currently in this queue.

popFront

popFront overloads

pushBack

pushBack overloads

removeAll

Remove all items from this queue.

size

DEPRECATED: Use capacity() instead.

tryPopFront

Attempt to remove the front element without blocking.

tryPushBack

tryPushBack overloads

operator BloombergLP::bslmf::NestedTraitDeclaration<FixedQueue, UsesBslmaAllocator>

Declare that this type uses a bslma allocator.

Friends

Name

Description

BloombergLP::bdlcc::FixedQueue_PopGuard

This class provides a destruction guard that pops an element from a FixedQueue.

BloombergLP::bdlcc::FixedQueue_PushProctor

This class provides a proctor that clears a FixedQueue on destruction unless released.

Created with MrDocs