logic: Fixed bugs in TaskParse scheduling
* Added TaskParse as base for TaskParseCxx and TaskParseJava * Fixed increment and decrement of indexer_count on blackboard not atomic * Fixed TaskInjectStorage finished before TaskParse started * Fixed project not cleared when refreshing on now empty project * Fixed TaskInjectStorage overheating when nothing to do
This commit is contained in:
@@ -13,6 +13,11 @@ Blackboard::~Blackboard()
|
||||
{
|
||||
}
|
||||
|
||||
std::mutex& Blackboard::getMutex()
|
||||
{
|
||||
return m_mutex;
|
||||
}
|
||||
|
||||
bool Blackboard::exists(const std::string& key)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_itemMutex);
|
||||
|
||||
@@ -37,6 +37,8 @@ public:
|
||||
Blackboard(std::shared_ptr<Blackboard> parent);
|
||||
~Blackboard();
|
||||
|
||||
std::mutex& getMutex();
|
||||
|
||||
template <typename T>
|
||||
void set(const std::string& key, const T& value);
|
||||
|
||||
@@ -51,6 +53,8 @@ private:
|
||||
|
||||
std::shared_ptr<Blackboard> m_parent;
|
||||
|
||||
std::mutex m_mutex;
|
||||
|
||||
ItemMap m_items;
|
||||
std::mutex m_itemMutex;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user