public function unlock() : void
    {
        if ($this->closed) {
            throw new IoException('The stream is closed.');
        }

        try {
            $result = ErrorCatcher::run(function() {
                return flock($this->handle, LOCK_UN);
            });
        } catch (\ErrorException $e) {
            throw new IoException($e->getMessage(), 0, $e);
        }

        if ($result === false) {
            throw new IoException('Failed to release the lock.');
        }
    }
public function unlock() : void
    {
        if ($this->closed) {
            throw new IoException('The stream is closed.');
        }

        try {
            $result = ErrorCatcher::run(function() {
                return flock($this->handle, LOCK_UN);
            });
        } catch (\ErrorException $e) {
            throw new IoException($e->getMessage(), 0, $e);
        }

        if ($result === false) {
            throw new IoException('Failed to release the lock.');
        }
    }
public function unlock ( ) : void { if ( $ this -> closed ) { throw new IoException ( 'The stream is closed.' ) ; } try { $ result = ErrorCatcher :: run ( function ( ) { return flock ( $ this -> handle , LOCK_UN ) ; } ) ; } catch ( \ ErrorException $ e ) { throw new IoException ( $ e -> getMessage ( ) , 0 , $ e ) ; } if ( $ result === false ) { throw new IoException ( 'Failed to release the lock.' ) ; } }
Releases an advisory lock.

@return void

@throws IoException
Releases an advisory lock .