Implement comparison so that std::priority_queue will pop the low priorities more urgently.
| 62 | // Implement comparison so that std::priority_queue will pop the low priorities more |
| 63 | // urgently. |
| 64 | bool operator<(const QueuedTask& other) const { |
| 65 | if (priority == other.priority) { |
| 66 | // Maintain execution order for tasks with the same priority. Its preferable to keep |
| 67 | // the execution order of tasks deterministic. |
| 68 | return spawn_index > other.spawn_index; |
| 69 | } |
| 70 | return priority > other.priority; |
| 71 | } |
| 72 | }; |
| 73 | |
| 74 | } // namespace |
nothing calls this directly
no outgoing calls
no test coverage detected