Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
TypedQAsync< T > Class Template Reference

Strongly typed queue class with asynchronous access. More...

#include <Queue.hxx>

Inheritance diagram for TypedQAsync< T >:
QAsync

Classes

class  BlockingWait
 Helper class for waiting (blocking the current thread) until a message in the queue shows up. More...
 

Public Member Functions

T * next_blocking ()
 
void typed_insert (T *entry)
 Inserts an entry at the end of the queue.
 
- Public Member Functions inherited from QAsync
 QAsync ()
 Default Constructor.
 
 ~QAsync ()
 Default destructor.
 
void insert (QMember *item, unsigned index=0)
 Add an item to the back of the queue.
 
void next_async (Executable *flow)
 Get an item from the front of the queue.
 
QMembernext (unsigned index)
 Get an item from the front of the queue.
 
Result next ()
 Get an item from the front of the queue.
 
Result next_locked ()
 Get an item from the front of the queue.
 
size_t pending (unsigned index)
 Get the number of pending items in the queue.
 
size_t pending ()
 Get the number of pending items in the queue.
 
bool empty (unsigned index)
 Test if the queue is empty.
 
bool empty ()
 Test if the queue is empty.
 

Detailed Description

template<class T>
class TypedQAsync< T >

Strongly typed queue class with asynchronous access.

Definition at line 405 of file Queue.hxx.

Member Function Documentation

◆ next_blocking()

template<class T >
T * TypedQAsync< T >::next_blocking ( )
inline
Returns
the next item from the queue. If the queue is currently empty, then blocks the current thread until an item is available. MUST NOT BE CALLED ON INTERFACE EXECUTORS.

Definition at line 411 of file Queue.hxx.

◆ typed_insert()

template<class T >
void TypedQAsync< T >::typed_insert ( T *  entry)
inline

Inserts an entry at the end of the queue.

Definition at line 417 of file Queue.hxx.


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