lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
Loading...
Searching...
No Matches
Pds::QueueSS< T > Class Template Reference

Queue of T over List (private base) whose insert, remove, atHead and atTail hold a pthread mutex (per the header comment, re-entrant but slow). More...

#include <QueueSlowSafeUx.hh>

Inherits Pds::List.

Public Member Functions

 QueueSS ()
 Initialize the mutex.
 
 ~QueueSS ()
 Destroy the mutex.
 
T * empty () const
 Return the list label as T*, without locking.
 
T * insert (Entry *entry)
 Append entry at the tail while holding the mutex; returns the entry it was inserted after.
 
T * remove ()
 Remove and return the head entry while holding the mutex (the list label if empty).
 
T * atHead () const
 Return the head entry while holding the mutex.
 
T * atTail () const
 Return the tail entry while holding the mutex.
 

Detailed Description

template<class T>
class Pds::QueueSS< T >

Queue of T over List (private base) whose insert, remove, atHead and atTail hold a pthread mutex (per the header comment, re-entrant but slow).

Note that atHead() and atTail() are const but call the non-const lock helpers.

Constructor & Destructor Documentation

◆ QueueSS()

template<class T >
Pds::QueueSS< T >::QueueSS ( )
inline

Initialize the mutex.

◆ ~QueueSS()

template<class T >
Pds::QueueSS< T >::~QueueSS ( )
inline

Destroy the mutex.

Member Function Documentation

◆ atHead()

template<class T >
T * Pds::QueueSS< T >::atHead ( ) const
inline

Return the head entry while holding the mutex.

◆ atTail()

template<class T >
T * Pds::QueueSS< T >::atTail ( ) const
inline

Return the tail entry while holding the mutex.

◆ empty()

template<class T >
T * Pds::QueueSS< T >::empty ( ) const
inline

Return the list label as T*, without locking.

◆ insert()

template<class T >
T * Pds::QueueSS< T >::insert ( Entry *  entry)
inline

Append entry at the tail while holding the mutex; returns the entry it was inserted after.

◆ remove()

template<class T >
T * Pds::QueueSS< T >::remove ( )
inline

Remove and return the head entry while holding the mutex (the list label if empty).


The documentation for this class was generated from the following file: