#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...
 
bool signaled () const
 whether writer has sent and reader has not received notification 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 28 of file Queue.h.

Member Typedef Documentation

◆ AtomicSignedMsec

Definition at line 61 of file Queue.h.

◆ Balance

Definition at line 62 of file Queue.h.

◆ Rate

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

Definition at line 57 of file Queue.h.

Constructor & Destructor Documentation

◆ QueueReader()

Ipc::QueueReader::QueueReader ( )

Definition at line 47 of file Queue.cc.

References debugs.

Member Function Documentation

◆ block()

void Ipc::QueueReader::block ( )
inline

Definition at line 40 of file Queue.h.

References popBlocked.

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

◆ blocked()

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

Definition at line 34 of file Queue.h.

References popBlocked.

Referenced by raiseSignal().

◆ clearSignal()

void Ipc::QueueReader::clearSignal ( )
inline

Definition at line 50 of file Queue.h.

References popSignal, and unblock().

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

◆ raiseSignal()

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 47 of file Queue.h.

References blocked(), and popSignal.

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

◆ signaled()

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

Definition at line 37 of file Queue.h.

References popSignal.

◆ unblock()

void Ipc::QueueReader::unblock ( )
inline

Definition at line 43 of file Queue.h.

References popBlocked.

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

Member Data Documentation

◆ balance

Balance Ipc::QueueReader::balance

Definition at line 64 of file Queue.h.

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

◆ id

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

Definition at line 67 of file Queue.h.

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

◆ popBlocked

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

Definition at line 53 of file Queue.h.

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

◆ popSignal

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

Definition at line 54 of file Queue.h.

Referenced by clearSignal(), raiseSignal(), and signaled().

◆ rateLimit

Rate Ipc::QueueReader::rateLimit

Definition at line 58 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