ConcurrentQueue policy to discard new elements when the queue is full.
More...
#include <artdaq-core/Core/ConcurrentQueue.hh>
|
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 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. More...
|
|
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. More...
|
|
template<class T>
struct artdaq::RejectNewest< T >
ConcurrentQueue policy to discard new elements when the queue is full.
- Template Parameters
-
T | Type of element to store in queue |
Definition at line 335 of file ConcurrentQueue.hh.
Attempts to enqueue an item.
- Parameters
-
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 |
- Returns
- Number of elements removed from the queue (1 if new element was rejected, 0 otherwise)
Definition at line 377 of file ConcurrentQueue.hh.
The documentation for this struct was generated from the following file: