sort by time after priority to better match Net2

This commit is contained in:
Evan Tschannen 2021-03-17 13:45:04 -07:00
parent 3275cd7b94
commit 514e80d8a5
1 changed files with 5 additions and 1 deletions

View File

@ -1115,8 +1115,12 @@ public:
self->tasks.pop();
}
std::sort(self->instantTasks.begin(), self->instantTasks.end(), [](const Task& a, const Task& b) {
if (a.taskID != b.taskID)
if (a.taskID != b.taskID) {
return a.taskID > b.taskID;
}
if (a.time != b.time) {
return a.time < b.time;
}
return a.stable < b.stable;
});
self->mutex.leave();