Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RobotAPI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lennard Hofmann
RobotAPI
Commits
5a029056
Commit
5a029056
authored
3 years ago
by
Rainer Kartmann
Browse files
Options
Downloads
Patches
Plain Diff
Remove global workingMemoryMutex from server::ComponentPlugin
parent
b8bd8d64
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
source/RobotAPI/libraries/armem/server/ComponentPlugin.cpp
+4
-4
4 additions, 4 deletions
source/RobotAPI/libraries/armem/server/ComponentPlugin.cpp
source/RobotAPI/libraries/armem/server/ComponentPlugin.h
+3
-2
3 additions, 2 deletions
source/RobotAPI/libraries/armem/server/ComponentPlugin.h
with
7 additions
and
6 deletions
source/RobotAPI/libraries/armem/server/ComponentPlugin.cpp
+
4
−
4
View file @
5a029056
...
...
@@ -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
);
}
...
...
This diff is collapsed.
Click to expand it.
source/RobotAPI/libraries/armem/server/ComponentPlugin.h
+
3
−
2
View file @
5a029056
...
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment