1
0
mirror of https://github.com/ceph/ceph synced 2025-04-01 23:02:17 +00:00

common/sharedptr_registry.hpp: add remove

remove() can be used to clear an entry before all of its
references are removed.

Signed-off-by: Samuel Just <sam.just@inktank.com>
This commit is contained in:
Samuel Just 2013-05-09 16:29:28 -07:00
parent 69b64826b7
commit b274c8a0b2

View File

@ -100,6 +100,12 @@ public:
return retval;
}
void remove(const K &key) {
Mutex::Locker l(lock);
contents.erase(key);
cond.Signal();
}
template<class A>
VPtr lookup_or_create(const K &key, const A &arg) {
Mutex::Locker l(lock);