Resource Tuner
|
This class represents a mutex-protected multiple producer, single consumer priority queue. More...
#include <RequestQueue.h>
Public Member Functions | |
void | orderedQueueConsumerHook () |
Provides a mechanism, to hook or plug-in the Consumer Code. | |
![]() | |
int8_t | addAndWakeup (Message *req) |
Used by the producers to add a new request to the OrderedQueue. | |
Message * | pop () |
Used by the consumer end to poll a request from the OrderedQueue. | |
void | wait () |
Used by the Consumer end to wait for Requests. | |
int8_t | hasPendingTasks () |
Used by the consumer to check if there are any pending requests in the OrderedQueue. | |
Additional Inherited Members | |
![]() | |
std::priority_queue< Message *, std::vector< Message * >, QueueOrdering > | mOrderedQueue |
Core OrderedQueue Data Structure, to store the Requests pushed by the Publisher threads. Makes use of std::priority_queue, which is ordered here based on the Request Priorities. | |
This class represents a mutex-protected multiple producer, single consumer priority queue.
It stores the pointer to the Requests and compares their priorities. The server thread picks up these requests in the order of their priorities and processes them.
Definition at line 18 of file RequestQueue.h.
|
virtual |
Provides a mechanism, to hook or plug-in the Consumer Code.
Using this routine, the consumer can safely (lock-protected) extract and process Requests enqueued by the Producers.
Implements OrderedQueue.