Resource Tuner
Loading...
Searching...
No Matches
RequestQueue Class Reference

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.
 
- Public Member Functions inherited from OrderedQueue
int8_t addAndWakeup (Message *req)
 Used by the producers to add a new request to the OrderedQueue.
 
Messagepop ()
 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

- Protected Attributes inherited from OrderedQueue
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.
 

Detailed Description

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.

Member Function Documentation

◆ orderedQueueConsumerHook()

void RequestQueue::orderedQueueConsumerHook ( )
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.


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