MCPcopy Create free account
hub / github.com/amule-project/amule / CTaskSorter

Class CTaskSorter

src/ThreadScheduler.cpp:178–188  ·  view source on GitHub ↗

This is the sorter functor for the task-queue. */

Source from the content-addressed store, hash-verified

176
177/** This is the sorter functor for the task-queue. */
178struct CTaskSorter
179{
180 bool operator()(const CThreadScheduler::CEntryPair& a, const CThreadScheduler::CEntryPair& b) {
181 if (a.first->GetPriority() != b.first->GetPriority()) {
182 return a.first->GetPriority() > b.first->GetPriority();
183 }
184
185 // Compare tasks numbers.
186 return a.second < b.second;
187 }
188};
189
190
191

Callers 1

EntryMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected