src/MutexLock.php
function release()
    {
        $lockRes = static::_getLocksDir("{$this->realm}.lockfile");

        if ( null === $file = $this->file )
            if (false === $file = fopen($lockRes, 'w+') )
                throw new \RuntimeException(sprintf(
                    'Failed To Open Resource (%s).'
                    , $lockRes
                ));


        ## Release Lock Res.
        #
        $this->file = null;

        if (! flock($file, LOCK_UN) )
            throw new \RuntimeException(sprintf(
                'FAILED to release lock[%s] on resource (%s).'
                , $this->realm
                , $lockRes
            ));


        fclose($file);
        unlink($lockRes);

        return true;
    }
function release()
    {
        $lockRes = static::_getLocksDir("{$this->realm}.lockfile");

        if ( null === $file = $this->file )
            if (false === $file = fopen($lockRes, 'w+') )
                throw new \RuntimeException(sprintf(
                    'Failed To Open Resource (%s).'
                    , $lockRes
                ));


        ## Release Lock Res.
        #
        $this->file = null;

        if (! flock($file, LOCK_UN) )
            throw new \RuntimeException(sprintf(
                'FAILED to release lock[%s] on resource (%s).'
                , $this->realm
                , $lockRes
            ));


        fclose($file);
        unlink($lockRes);

        return true;
    }
function release ( ) { $ lockRes = static :: _getLocksDir ( "{$this->realm}.lockfile" ) ; if ( null === $ file = $ this -> file ) if ( false === $ file = fopen ( $ lockRes , 'w+' ) ) throw new \ RuntimeException ( sprintf ( 'Failed To Open Resource (%s).' , $ lockRes ) ) ; ## Release Lock Res. # $ this -> file = null ; if ( ! flock ( $ file , LOCK_UN ) ) throw new \ RuntimeException ( sprintf ( 'FAILED to release lock[%s] on resource (%s).' , $ this -> realm , $ lockRes ) ) ; fclose ( $ file ) ; unlink ( $ lockRes ) ; return true ; }
Unlock Resource Locked

@return bool
Unlock Resource Locked