hasLock example


    public abstract function clear(Smarty $smarty$resource_name$cache_id$compile_id$exp_time);


    public function locked(Smarty $smarty, Smarty_Template_Cached $cached)
    {
        // theoretically locking_timeout should be checked against time_limit (max_execution_time)         $start = microtime(true);
        $hadLock = null;
        while ($this->hasLock($smarty$cached)) {
            $hadLock = true;
            if (microtime(true) - $start > $smarty->locking_timeout) {
                // abort waiting for lock release                 return false;
            }
            sleep(1);
        }
        return $hadLock;
    }

    public function hasLock(Smarty $smarty, Smarty_Template_Cached $cached)
    {
Home | Imprint | This part of the site doesn't use cookies.