Skip to content

Commit d5d9f30

Browse files
committed
Add Clear() method to ConcurrentMap
I'm not entirely positive this is actually used anywhere, could not find it in the diff
1 parent fa5948b commit d5d9f30

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

NativeScript/runtime/ConcurrentMap.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ class ConcurrentMap {
4949
}
5050
}
5151

52+
inline void Clear() {
53+
std::lock_guard<std::mutex> writerLock(this->containerMutex_);
54+
container_.clear();
55+
}
56+
5257
ConcurrentMap() = default;
5358
ConcurrentMap(const ConcurrentMap&) = delete;
5459
ConcurrentMap& operator=(const ConcurrentMap&) = delete;

0 commit comments

Comments
 (0)