logic: Fixed indexing tasks

* Added mutex to BlackBoard
* stop inject task from blocking CPU in endless loop
This commit is contained in:
Eberhard Graether
2016-09-15 00:02:50 +02:00
parent ae879ba0f7
commit b1b2262581
3 changed files with 14 additions and 0 deletions
+4
View File
@@ -1,5 +1,8 @@
#include "data/TaskInjectStorage.h"
#include <chrono>
#include <thread>
#include "data/Storage.h"
#include "data/StorageProvider.h"
#include "utility/scheduling/Blackboard.h"
@@ -34,6 +37,7 @@ Task::TaskState TaskInjectStorage::doUpdate(std::shared_ptr<Blackboard> blackboa
{
if (indexerCount > 0)
{
std::this_thread::sleep_for(std::chrono::milliseconds(100));
return STATE_SUCCESS;
}
}