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

Lock core segments in MemoryRemoteGui

parent 11c9946a
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.
...@@ -122,7 +122,7 @@ namespace armarx ...@@ -122,7 +122,7 @@ namespace armarx
using namespace armarx::RemoteGui::Client; using namespace armarx::RemoteGui::Client;
{ {
std::scoped_lock lock(workingMemoryMutex); // Core segments are locked by MemoryRemoteGui.
tab.memoryGroup = armem::server::MemoryRemoteGui().makeGroupBox(workingMemory); tab.memoryGroup = armem::server::MemoryRemoteGui().makeGroupBox(workingMemory);
} }
......
...@@ -31,9 +31,10 @@ namespace armarx::armem::server ...@@ -31,9 +31,10 @@ namespace armarx::armem::server
} }
MemoryRemoteGui::GroupBox MemoryRemoteGui::makeGroupBox(const wm::CoreSegment& coreSegment) const MemoryRemoteGui::GroupBox MemoryRemoteGui::makeGroupBox(const wm::CoreSegment& coreSegment) const
{ {
std::scoped_lock lock(coreSegment.mutex());
GroupBox group; GroupBox group;
group.setLabel(makeGroupLabel("Core Segment", coreSegment.name(), coreSegment.providerSegments().size())); group.setLabel(makeGroupLabel("Core Segment", coreSegment.name(), coreSegment.providerSegments().size()));
...@@ -50,7 +51,6 @@ namespace armarx::armem::server ...@@ -50,7 +51,6 @@ namespace armarx::armem::server
} }
MemoryRemoteGui::GroupBox MemoryRemoteGui::makeGroupBox(const wm::ProviderSegment& providerSegment) const MemoryRemoteGui::GroupBox MemoryRemoteGui::makeGroupBox(const wm::ProviderSegment& providerSegment) const
{ {
GroupBox group; GroupBox group;
...@@ -69,7 +69,6 @@ namespace armarx::armem::server ...@@ -69,7 +69,6 @@ namespace armarx::armem::server
} }
MemoryRemoteGui::GroupBox MemoryRemoteGui::makeGroupBox(const wm::Entity& entity) const MemoryRemoteGui::GroupBox MemoryRemoteGui::makeGroupBox(const wm::Entity& entity) const
{ {
GroupBox group; GroupBox group;
...@@ -109,7 +108,6 @@ namespace armarx::armem::server ...@@ -109,7 +108,6 @@ namespace armarx::armem::server
} }
MemoryRemoteGui::GroupBox MemoryRemoteGui::makeGroupBox(const wm::EntitySnapshot& snapshot) const MemoryRemoteGui::GroupBox MemoryRemoteGui::makeGroupBox(const wm::EntitySnapshot& snapshot) const
{ {
GroupBox group; GroupBox group;
...@@ -129,6 +127,7 @@ namespace armarx::armem::server ...@@ -129,6 +127,7 @@ namespace armarx::armem::server
return group; return group;
} }
MemoryRemoteGui::GroupBox MemoryRemoteGui::makeGroupBox(const wm::EntityInstance& instance) const MemoryRemoteGui::GroupBox MemoryRemoteGui::makeGroupBox(const wm::EntityInstance& instance) const
{ {
GroupBox group; GroupBox group;
...@@ -153,7 +152,6 @@ namespace armarx::armem::server ...@@ -153,7 +152,6 @@ namespace armarx::armem::server
} }
std::string MemoryRemoteGui::makeGroupLabel( std::string MemoryRemoteGui::makeGroupLabel(
const std::string& term, const std::string& name, size_t size, const std::string& term, const std::string& name, size_t size,
const std::string& namePrefix, const std::string& nameSuffix) const const std::string& namePrefix, const std::string& nameSuffix) const
......
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