|
Squid Web Cache master
|
#include <Queue.h>
Public Types | |
| typedef std::atomic< int > | Rate |
| pop()s per second | |
| typedef std::atomic< int > | AtomicSignedMsec |
| typedef AtomicSignedMsec | Balance |
Public Member Functions | |
| QueueReader () | |
| bool | blocked () const |
| whether the reader is waiting for a notification signal | |
| bool | signaled () const |
| whether writer has sent and reader has not received notification | |
| void | block () |
| marks the reader as blocked, waiting for a notification signal | |
| void | unblock () |
| removes the block() effects | |
| bool | raiseSignal () |
| void | clearSignal () |
| marks sent reader notification as received (also removes pop blocking) | |
Public Attributes | |
| Rate | rateLimit |
| pop()s per second limit if positive | |
| Balance | balance |
| how far ahead the reader is compared to a perfect read/sec event rate | |
| const InstanceId< QueueReader > | id |
| unique ID for debugging which reader is used (works across processes) | |
Private Attributes | |
| std::atomic< bool > | popBlocked |
| whether the reader is blocked on pop() | |
| std::atomic< bool > | popSignal |
| whether writer has sent and reader has not received notification | |
State of the reading end of a queue (i.e., of the code calling pop()). Multiple queues attached to one reader share this state.
| typedef std::atomic<int> Ipc::QueueReader::AtomicSignedMsec |
| typedef std::atomic<int> Ipc::QueueReader::Rate |
|
inline |
Definition at line 40 of file Queue.h.
References popBlocked.
Referenced by Ipc::OneToOneUniQueue::pop().
|
inline |
|
inline |
Definition at line 50 of file Queue.h.
References popSignal, and unblock().
Referenced by Ipc::BaseMultiQueue::clearAllReaderSignals().
|
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().
|
inline |
|
inline |
Definition at line 43 of file Queue.h.
References popBlocked.
Referenced by clearSignal(), and Ipc::OneToOneUniQueue::pop().
| Balance Ipc::QueueReader::balance |
Definition at line 64 of file Queue.h.
Referenced by Ipc::BaseMultiQueue::balance(), and Ipc::BaseMultiQueue::localBalance().
| const InstanceId<QueueReader> Ipc::QueueReader::id |
Definition at line 67 of file Queue.h.
Referenced by Ipc::BaseMultiQueue::clearAllReaderSignals().
|
private |
|
private |
Definition at line 54 of file Queue.h.
Referenced by clearSignal(), raiseSignal(), and signaled().
| Rate Ipc::QueueReader::rateLimit |
Definition at line 58 of file Queue.h.
Referenced by Ipc::BaseMultiQueue::localRateLimit(), and Ipc::BaseMultiQueue::rateLimit().