Skip to content
Snippets Groups Projects
Commit 5a029056 authored by Rainer Kartmann's avatar Rainer Kartmann
Browse files

Remove global workingMemoryMutex from server::ComponentPlugin

parent b8bd8d64
No related branches found
No related tags found
2 merge requests!185Clean up interfaces and unneeded code in memory core classes,!178Draft: Make RobotStateMemory ready
This commit is part of merge request !178. Comments created here will be created in the context of that merge request.
......@@ -130,7 +130,7 @@ namespace armarx::armem::server
data::AddSegmentsResult ComponentPluginUser::addSegments(const data::AddSegmentsInput& input, bool addCoreSegments)
{
std::scoped_lock lock(workingMemoryMutex);
// std::scoped_lock lock(workingMemoryMutex);
data::AddSegmentsResult result = iceMemory.addSegments(input, addCoreSegments);
return result;
}
......@@ -138,7 +138,7 @@ namespace armarx::armem::server
data::CommitResult ComponentPluginUser::commit(const data::Commit& commitIce, const Ice::Current&)
{
std::scoped_lock lock(workingMemoryMutex);
// std::scoped_lock lock(workingMemoryMutex);
return iceMemory.commit(commitIce);
}
......@@ -146,7 +146,7 @@ namespace armarx::armem::server
// READING
armem::query::data::Result ComponentPluginUser::query(const armem::query::data::Input& input, const Ice::Current&)
{
std::scoped_lock lock(workingMemoryMutex);
// std::scoped_lock lock(workingMemoryMutex);
return iceMemory.query(input);
}
......@@ -154,7 +154,7 @@ namespace armarx::armem::server
// LTM STORING
data::StoreResult ComponentPluginUser::store(const data::StoreInput& input, const Ice::Current&)
{
std::scoped_lock lock(workingMemoryMutex, longtermMemoryMutex);
std::scoped_lock lock(/*workingMemoryMutex,*/ longtermMemoryMutex);
return iceMemory.store(input);
}
......
......@@ -10,8 +10,8 @@
#include <RobotAPI/libraries/armem/core/workingmemory/Memory.h>
#include <RobotAPI/libraries/armem/core/longtermmemory/Memory.h>
#include <RobotAPI/libraries/armem/client/MemoryNameSystemComponentPlugin.h>
#include "MemoryToIceAdapter.h"
......@@ -99,7 +99,8 @@ namespace armarx::armem::server
/// The actual memory.
wm::Memory workingMemory;
std::mutex workingMemoryMutex;
// [[deprecated ("The global working memory mutex is deprecated. Use the core segment mutexes instead.")]]
// std::mutex workingMemoryMutex;
bool longtermMemoryEnabled = true;
ltm::Memory longtermMemory;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment