<?php
namespace Claromentis\Core\Lock;

$GLOBALS["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"] = (@$GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"] ?: array()) + array();
trait AbstractLockTrait
{
    public function doUnderLock(string $key_name, callable $callback)
    {
        $this->acquireLock($key_name);
        try {
            return $callback();
        } finally {
            $this->releaseLock($key_name);
        }
    }
}