MCPcopy Create free account
hub / github.com/Icinga/icinga2 / LockIfRequired

Method LockIfRequired

lib/base/dictionary.cpp:293–299  ·  view source on GitHub ↗

* Returns an already locked ObjectLock if the dictionary is frozen. * Otherwise, returns an unlocked object lock. * * @returns An object lock. */

Source from the content-addressed store, hash-verified

291 * @returns An object lock.
292 */
293ObjectLock Dictionary::LockIfRequired()
294{
295 if (Frozen()) {
296 return ObjectLock(this, std::defer_lock);
297 }
298 return ObjectLock(this);
299}
300
301Value Dictionary::GetFieldByName(const String& field, bool, const DebugInfo& debugInfo) const
302{

Callers

nothing calls this directly

Calls 1

ObjectLockClass · 0.85

Tested by

no test coverage detected