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:
parent
69b64826b7
commit
b274c8a0b2
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user