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

This class represents a mutex-protected multiple producer, single consumer priority queue. More...

#include <SignalQueue.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 Signals and compares their priorities. A server thread picks up these signal requests in the order of their priorities and processes them.

Definition at line 19 of file SignalQueue.h.

Member Function Documentation

◆ orderedQueueConsumerHook()

void SignalQueue::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: