| 30 | using TaskFunction = std::function<void ()>; |
| 31 | |
| 32 | struct Task |
| 33 | { |
| 34 | Task() = default; |
| 35 | |
| 36 | Task(TaskFunction function, WorkQueuePriority priority, int id) |
| 37 | : Function(std::move(function)), Priority(priority), ID(id) |
| 38 | { } |
| 39 | |
| 40 | TaskFunction Function; |
| 41 | WorkQueuePriority Priority{PriorityNormal}; |
| 42 | int ID{-1}; |
| 43 | }; |
| 44 | |
| 45 | bool operator<(const Task& a, const Task& b); |
| 46 |