ServiceController增加size方法 (#3587)
This commit is contained in:
parent
49dfccd56f
commit
8dad1983a0
|
|
@ -323,6 +323,11 @@ public:
|
||||||
return _map.erase(key);
|
return _map.erase(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t size() {
|
||||||
|
std::lock_guard<std::recursive_mutex> lck(_mtx);
|
||||||
|
return _map.size();
|
||||||
|
}
|
||||||
|
|
||||||
Pointer find(const std::string &key) const {
|
Pointer find(const std::string &key) const {
|
||||||
std::lock_guard<std::recursive_mutex> lck(_mtx);
|
std::lock_guard<std::recursive_mutex> lck(_mtx);
|
||||||
auto it = _map.find(key);
|
auto it = _map.find(key);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue