MCPcopy Create free account
hub / github.com/apache/arrow / operator<

Method operator<

cpp/src/arrow/util/thread_pool.cc:64–71  ·  view source on GitHub ↗

Implement comparison so that std::priority_queue will pop the low priorities more urgently.

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected