|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Priority queue for scheduling timed events. More...
#include <unistd.h>#include <iostream>#include <cassert>#include <cstdlib>#include <mutex>#include <condition_variable>#include <thread>#include <chrono>#include <functional>#include <string>#include <atomic>#include <cstdint>#include <ah-errors.H>#include <tpl_dynMapTree.H>#include <tpl_dynSetTree.H>#include <tpl_binHeap.H>#include <ah-time.H>#include <utility>Go to the source code of this file.
Classes | |
| class | TimeoutQueue |
| Thread-safe priority queue for scheduling timed events. More... | |
| class | TimeoutQueue::Event |
| Base class for scheduled events. More... | |
Priority queue for scheduling timed events.
This file provides a thread-safe priority queue for scheduling events that should be triggered at specific absolute times. It uses a background thread to monitor the queue and execute events when their trigger time arrives.
Events transition through these states:
Out_Queue: Not currently scheduledIn_Queue: Waiting for trigger timeCanceled: Removed before executionExecuting: Currently running EventFct()Executed: Completed executionTo_Delete: Marked for cleanupDeleted: Cleaned upDefinition in file timeoutQueue.H.