fixed #3
@@ -157,14 +157,12 @@ public:
|
||||
for (auto& empty : emptyKeys)
|
||||
sortedByKernelNeeds.erase(empty);
|
||||
|
||||
vector<T*> toDel;
|
||||
// проверяем нет ли завершившихся задач
|
||||
for (auto it = activeTaskSet.begin(); it != activeTaskSet.end(); )
|
||||
for (auto& task : activeTaskSet)
|
||||
{
|
||||
T* task = *(it);
|
||||
|
||||
if (task->Check()) {
|
||||
it++;
|
||||
activeTaskSet.erase(task);
|
||||
toDel.push_back(task);
|
||||
activeTasks--;
|
||||
done++;
|
||||
busyKernels -= task->getKernels();
|
||||
@@ -172,11 +170,12 @@ public:
|
||||
|
||||
buf += to_string(task->getId()) + " " + string(task->printState().getCharArray()) + " " + to_string(task->getTotalTime()) + "\n";
|
||||
task->copyResults(pathRes);
|
||||
continue;
|
||||
}
|
||||
it++;
|
||||
}
|
||||
|
||||
for (auto& del : toDel)
|
||||
activeTaskSet.erase(del);
|
||||
|
||||
if (oldActiveTasks != activeTasks)
|
||||
printf("done %ld / %ld\n", done, this->getLength());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user