#include <Queue.h>

Collaboration diagram for Ipc::QueueReader:

Public Types

typedef std::atomic< intRate
 pop()s per second More...
 
typedef std::atomic< intAtomicSignedMsec
 
typedef AtomicSignedMsec Balance
 

Public Member Functions

 QueueReader ()
 
bool blocked () const
 whether the reader is waiting for a notification signal More...
 
void block ()
 marks the reader as blocked, waiting for a notification signal More...
 
void unblock ()
 removes the block() effects More...
 
bool raiseSignal ()
 
void clearSignal ()
 marks sent reader notification as received (also removes pop blocking) More...
 

Public Attributes

Rate rateLimit
 pop()s per second limit if positive More...
 
Balance balance
 how far ahead the reader is compared to a perfect read/sec event rate More...
 
const InstanceId< QueueReaderid
 unique ID for debugging which reader is used (works across processes) More...
 

Private Attributes

std::atomic< bool > popBlocked
 whether the reader is blocked on pop() More...
 
std::atomic< bool > popSignal
 whether writer has sent and reader has not received notification More...
 

Detailed Description

State of the reading end of a queue (i.e., of the code calling pop()). Multiple queues attached to one reader share this state.

Definition at line 27 of file Queue.h.

Member Typedef Documentation

Definition at line 57 of file Queue.h.

Definition at line 58 of file Queue.h.

typedef std::atomic<int> Ipc::QueueReader::Rate

Definition at line 53 of file Queue.h.

Constructor & Destructor Documentation

Ipc::QueueReader::QueueReader ( )

Definition at line 47 of file Queue.cc.

References debugs, and HERE().

Member Function Documentation

void Ipc::QueueReader::block ( )
inline

Definition at line 36 of file Queue.h.

References popBlocked.

Referenced by Ipc::OneToOneUniQueue::pop().

bool Ipc::QueueReader::blocked ( ) const
inline

Definition at line 33 of file Queue.h.

References popBlocked.

Referenced by raiseSignal().

void Ipc::QueueReader::clearSignal ( )
inline

Definition at line 46 of file Queue.h.

References popSignal, and unblock().

Referenced by Ipc::BaseMultiQueue::clearReaderSignal().

bool Ipc::QueueReader::raiseSignal ( )
inline

if reader is blocked and not notified, marks the notification signal as sent and not received, returning true; otherwise, returns false

Definition at line 43 of file Queue.h.

References blocked(), and popSignal.

Referenced by Ipc::OneToOneUniQueue::push().

void Ipc::QueueReader::unblock ( )
inline

Definition at line 39 of file Queue.h.

References popBlocked.

Referenced by clearSignal(), and Ipc::OneToOneUniQueue::pop().

Member Data Documentation

Balance Ipc::QueueReader::balance

Definition at line 60 of file Queue.h.

Referenced by Ipc::BaseMultiQueue::balance(), and Ipc::BaseMultiQueue::localBalance().

const InstanceId<QueueReader> Ipc::QueueReader::id

Definition at line 63 of file Queue.h.

Referenced by Ipc::BaseMultiQueue::clearReaderSignal().

std::atomic<bool> Ipc::QueueReader::popBlocked
private

Definition at line 49 of file Queue.h.

Referenced by block(), blocked(), and unblock().

std::atomic<bool> Ipc::QueueReader::popSignal
private

Definition at line 50 of file Queue.h.

Referenced by clearSignal(), and raiseSignal().

Rate Ipc::QueueReader::rateLimit

Definition at line 54 of file Queue.h.

Referenced by Ipc::BaseMultiQueue::localRateLimit(), and Ipc::BaseMultiQueue::rateLimit().


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors