ConcurrentQueue policy to discard new elements when the queue is full. More...
#include <artdaq-core/Core/ConcurrentQueue.hh>
Public Types | |
typedef std::pair< T, size_t > | ValueType |
Type of elements stored in the queue. | |
typedef std::list< T > | SequenceType |
Type of sequences of items. | |
typedef SequenceType::size_type | SizeType |
Size type of seqeuences. | |
typedef SizeType | ReturnType |
Type returned by doEnq. | |
Static Public Member Functions | |
static void | doInsert (T const &item, SequenceType &elements, SizeType &size, detail::MemoryType const &itemSize, detail::MemoryType &used, std::condition_variable &nonempty) |
Inserts element into the ConcurrentQueue. | |
static ReturnType | doEnq (T const &item, SequenceType &elements, SizeType &size, SizeType &capacity, detail::MemoryType &used, detail::MemoryType &memory, size_t &elementsDropped, std::condition_variable &nonempty) |
Attempts to enqueue an item. |
ConcurrentQueue policy to discard new elements when the queue is full.
T | Type of element to store in queue |
Definition at line 343 of file ConcurrentQueue.hh.
static ReturnType artdaq::RejectNewest< T >::doEnq | ( | T const & | item, | |
SequenceType & | elements, | |||
SizeType & | size, | |||
SizeType & | capacity, | |||
detail::MemoryType & | used, | |||
detail::MemoryType & | memory, | |||
size_t & | elementsDropped, | |||
std::condition_variable & | nonempty | |||
) | [inline, static] |
Attempts to enqueue an item.
item | Item to enqueue | |
elements | The ConcurrentQueue data | |
size | Number of elements in the ConcurrentQueue | |
capacity | Maximum number of elements in the ConcurrentQueue | |
used | Memory used by the ConcurrentQueue elements | |
memory | Amount of memory available for use by the ConcurrentQueue | |
elementsDropped | Number of failed insert operations | |
nonempty | Condition variable to notify readers of new data on the queue |
Definition at line 388 of file ConcurrentQueue.hh.
static void artdaq::RejectNewest< T >::doInsert | ( | T const & | item, | |
SequenceType & | elements, | |||
SizeType & | size, | |||
detail::MemoryType const & | itemSize, | |||
detail::MemoryType & | used, | |||
std::condition_variable & | nonempty | |||
) | [inline, static] |
Inserts element into the ConcurrentQueue.
item | Item to insert | |
elements | The ConcurrentQueue data | |
size | Number of elements in the ConcurrentQueue | |
itemSize | Size of the newly-inserted element | |
used | Memory used by the ConcurrentQueue elements | |
nonempty | Condition variable to notify readers of new data on queue |
Definition at line 360 of file ConcurrentQueue.hh.