void clear() { Map.clear(); }
- /// Return 1 if the specified key is in the map, 0 otherwise.\r
+ /// Return 1 if the specified key is in the map, 0 otherwise.
size_type count(const KeyT &Val) const {
return Map.find_as(Val) == Map.end() ? 0 : 1;
}
ValueMapCallbackVH Copy(*this);
typename Config::mutex_type *M = Config::getMutex(Copy.Map->Data);
if (M)
- M->acquire();
+ M->lock();
Config::onDelete(Copy.Map->Data, Copy.Unwrap()); // May destroy *this.
Copy.Map->Map.erase(Copy); // Definitely destroys *this.
if (M)
- M->release();
+ M->unlock();
}
void allUsesReplacedWith(Value *new_key) override {
assert(isa<KeySansPointerT>(new_key) &&
ValueMapCallbackVH Copy(*this);
typename Config::mutex_type *M = Config::getMutex(Copy.Map->Data);
if (M)
- M->acquire();
+ M->lock();
KeyT typed_new_key = cast<KeySansPointerT>(new_key);
// Can destroy *this:
}
}
if (M)
- M->release();
+ M->unlock();
}
};