framework/mutex/FileMutex.php
protected function releaseLock($name)
    {
        if (!isset($this->_files[$name])) {
            return false;
        }

        if ($this->isWindows) {
            // Under windows it's not possible to delete a file opened via fopen (either by own or other process).
            // That's why we must first unlock and close the handle and then *try* to delete the lock file.
            flock($this->_files[$name], LOCK_UN);
            fclose($this->_files[$name]);
            @unlink($this->getLockFilePath($name));
        } else {
            // Under unix it's possible to delete a file opened via fopen (either by own or other process).
            // That's why we must unlink (the currently locked) lock file first and then unlock and close the handle.
            unlink($this->getLockFilePath($name));
            flock($this->_files[$name], LOCK_UN);
            fclose($this->_files[$name]);
        }

        unset($this->_files[$name]);
        return true;
    }
protected function releaseLock($name)
    {
        if (!isset($this->_files[$name])) {
            return false;
        }

        if ($this->isWindows) {
            // Under windows it's not possible to delete a file opened via fopen (either by own or other process).
            // That's why we must first unlock and close the handle and then *try* to delete the lock file.
            flock($this->_files[$name], LOCK_UN);
            fclose($this->_files[$name]);
            @unlink($this->getLockFilePath($name));
        } else {
            // Under unix it's possible to delete a file opened via fopen (either by own or other process).
            // That's why we must unlink (the currently locked) lock file first and then unlock and close the handle.
            unlink($this->getLockFilePath($name));
            flock($this->_files[$name], LOCK_UN);
            fclose($this->_files[$name]);
        }

        unset($this->_files[$name]);
        return true;
    }
protected function releaseLock ( $ name ) { if ( ! isset ( $ this -> _files [ $ name ] ) ) { return false ; } if ( $ this -> isWindows ) { // Under windows it's not possible to delete a file opened via fopen (either by own or other process). // That's why we must first unlock and close the handle and then *try* to delete the lock file. flock ( $ this -> _files [ $ name ] , LOCK_UN ) ; fclose ( $ this -> _files [ $ name ] ) ; @ unlink ( $ this -> getLockFilePath ( $ name ) ) ; } else { // Under unix it's possible to delete a file opened via fopen (either by own or other process). // That's why we must unlink (the currently locked) lock file first and then unlock and close the handle. unlink ( $ this -> getLockFilePath ( $ name ) ) ; flock ( $ this -> _files [ $ name ] , LOCK_UN ) ; fclose ( $ this -> _files [ $ name ] ) ; } unset ( $ this -> _files [ $ name ] ) ; return true ; }
Releases lock by given name.
@param string $name of the lock to be released.
@return bool release result.
Releases lock by given name .