fixed and improved
This commit is contained in:
@@ -124,9 +124,13 @@ public:
|
||||
Utils::Mkdir(pathRes);
|
||||
string buf;
|
||||
|
||||
vector<int> emptyKeys;
|
||||
vector<T*> toDel;
|
||||
|
||||
while (activeTasks) {
|
||||
long oldActiveTasks = activeTasks;
|
||||
vector<int> emptyKeys;
|
||||
emptyKeys.clear();
|
||||
toDel.clear();
|
||||
|
||||
//ставим задачи от больших к меньшему по ядрам
|
||||
for (auto& elem : sortedByKernelNeeds) {
|
||||
@@ -156,8 +160,7 @@ public:
|
||||
// очищаем от пустых ключей
|
||||
for (auto& empty : emptyKeys)
|
||||
sortedByKernelNeeds.erase(empty);
|
||||
|
||||
vector<T*> toDel;
|
||||
|
||||
// проверяем нет ли завершившихся задач
|
||||
for (auto& task : activeTaskSet)
|
||||
{
|
||||
@@ -173,6 +176,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
// очищаем завершенные задачи
|
||||
for (auto& del : toDel)
|
||||
activeTaskSet.erase(del);
|
||||
|
||||
@@ -182,7 +186,7 @@ public:
|
||||
|
||||
changeState();
|
||||
|
||||
String outFile(pathRes + "/"+getStatePrefix()+"Info.txt");
|
||||
String outFile(pathRes + "/" + getStatePrefix() + "Info.txt");
|
||||
File tmp(outFile, String(buf.c_str()));
|
||||
}
|
||||
void saveState() {
|
||||
|
||||
Reference in New Issue
Block a user