#include <Queue.h>
Public Types | |
typedef std::atomic< int > | Rate |
pop()s per second More... | |
typedef std::atomic< int > | AtomicSignedMsec |
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< QueueReader > | id |
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.
Member Typedef Documentation
◆ AtomicSignedMsec
typedef std::atomic<int> Ipc::QueueReader::AtomicSignedMsec |
◆ Balance
◆ Rate
typedef std::atomic<int> Ipc::QueueReader::Rate |
Constructor & Destructor Documentation
◆ QueueReader()
Member Function Documentation
◆ block()
|
inline |
Definition at line 40 of file Queue.h.
References popBlocked.
Referenced by Ipc::OneToOneUniQueue::pop().
◆ blocked()
|
inline |
◆ clearSignal()
|
inline |
Definition at line 50 of file Queue.h.
References popSignal, and unblock().
Referenced by Ipc::BaseMultiQueue::clearAllReaderSignals().
◆ 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()
|
inline |
◆ 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
|
private |
◆ 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: