|
C++ Concurrency Sandbox
|
A wrapper for a callable task associated with a priority level. More...
Public Member Functions | |
| bool | operator< (const PriorityTask &other) const |
| Comparator for the priority queue. | |
Public Attributes | |
| int | priority |
| Priority level (higher values indicate higher importance). | |
| std::function< void()> | func |
| The actual task/function to be executed. | |
A wrapper for a callable task associated with a priority level.
Definition at line 23 of file Priority.cpp.
|
inline |
Comparator for the priority queue.
std::priority_queue to order tasks such that the one with the highest priority number is at the top. | other | The other task to compare against. |
Definition at line 34 of file Priority.cpp.
References priority.
| std::function<void()> PriorityTask::func |
The actual task/function to be executed.
Definition at line 25 of file Priority.cpp.
| int PriorityTask::priority |
Priority level (higher values indicate higher importance).
Definition at line 24 of file Priority.cpp.
Referenced by operator<().