Developer documentation
Version 3.0.3-105-gd3941f44
MR::Thread::Queue< T >::Reader Class Reference

This class is used to register a reader with the queue. More...

#include "thread_queue.h"

Classes

class  Item
 This class is used to read items from the queue. More...
 

Public Member Functions

 Reader (Queue< T > &queue)
 Register a Reader object with the queue. More...
 
 Reader (const Reader &reader)
 
Item placeholder () const
 

Detailed Description

template<class T>
class MR::Thread::Queue< T >::Reader

This class is used to register a reader with the queue.

Items cannot be read directly from a Thread::Queue queue. An object of this class must be instanciated to notify the queue that a section of code will be reading from the queue. The actual process of reading items from the queue is done via the Reader::Item class.

See also
Thread::Queue for more detailed information and examples.
Thread::run_queue() for a much more user-friendly way of setting up a queue.

Definition at line 445 of file thread_queue.h.

Constructor & Destructor Documentation

◆ Reader() [1/2]

template<class T >
MR::Thread::Queue< T >::Reader::Reader ( Queue< T > &  queue)
inline

Register a Reader object with the queue.

The Reader object will register itself with the queue as a reader.

Definition at line 450 of file thread_queue.h.

◆ Reader() [2/2]

template<class T >
MR::Thread::Queue< T >::Reader::Reader ( const Reader reader)
inline

Definition at line 453 of file thread_queue.h.

Member Function Documentation

◆ placeholder()

template<class T >
Item MR::Thread::Queue< T >::Reader::placeholder ( ) const
inline

Definition at line 509 of file thread_queue.h.


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