projects
/
platform
/
core
/
api
/
vine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
583c0f2
)
Add lock_guard VineMap::for_each
54/265554/2
author
cheoleun moon
<chleun.moon@samsung.com>
Fri, 22 Oct 2021 02:22:48 +0000
(11:22 +0900)
committer
cheoleun moon
<chleun.moon@samsung.com>
Fri, 22 Oct 2021 06:34:57 +0000
(06:34 +0000)
Change-Id: I72ba4c67ae61c1644668bdb4eaa7da1d146a81d5
src/include/vine-map.h
patch
|
blob
|
history
diff --git
a/src/include/vine-map.h
b/src/include/vine-map.h
index
6b06157
..
cccaadc
100755
(executable)
--- a/
src/include/vine-map.h
+++ b/
src/include/vine-map.h
@@
-69,6
+69,7
@@
public:
// The protyotype of do_func(): void func(K &k, V & v)
template <class BinaryPredicate> void for_each(BinaryPredicate do_func)
{
+ std::lock_guard<std::mutex> lock_guard(_q_mutex);
for (auto it = _map.begin(); it != _map.end(); ++it)
do_func(it->first, it->second);
}