31 #ifndef ITIMEDQUEUE_H_ 32 #define ITIMEDQUEUE_H_ 58 void startQueue(int32_t index, int32_t threadPriority, int32_t threadPolicy);
59 void stopQueue(int32_t index);
60 bool enqueue(int32_t index, std::shared_ptr<ITimedQueueEntry> &entry, int64_t &
id);
61 void removeQueueEntry(int32_t index, int64_t
id);
62 virtual void processQueueEntry(int32_t index, int64_t
id, std::shared_ptr<ITimedQueueEntry> &entry) = 0;
64 static const int32_t _bufferSize = 1000;
65 std::vector<bool> _firstPositionChanged;
66 std::unique_ptr<std::mutex[]> _bufferMutex =
nullptr;
67 std::vector<std::map<int64_t, std::shared_ptr<ITimedQueueEntry>>> _buffer;
68 std::unique_ptr<std::mutex[]> _processingThreadMutex =
nullptr;
69 std::vector<std::thread> _processingThread;
70 std::unique_ptr<std::condition_variable[]> _processingConditionVariable =
nullptr;
72 void process(int32_t index);
This is the base library main class.
Definition: BaseLib.h:95
Definition: IQueueBase.h:45
Definition: BaseLib.cpp:34
Definition: ITimedQueue.h:41
PVariable value
Definition: UiElements.h:217
int64_t getTime()
Definition: ITimedQueue.h:47
ITimedQueueEntry(int64_t time)
Definition: ITimedQueue.h:44
void setTime(int64_t value)
Definition: ITimedQueue.h:48
ITimedQueueEntry()
Definition: ITimedQueue.h:43
Definition: ITimedQueue.h:53
virtual ~ITimedQueueEntry()
Definition: ITimedQueue.h:45