src/MemoryCache.php
protected function unlock(string $key)
    {
        if (!isset($this->locks[$key])) {
            throw new InvalidArgumentError('No lock was set on the given key.');
        }

        $awaitable = $this->locks[$key];
        unset($this->locks[$key]);
        $awaitable->resolve();
    }
protected function unlock(string $key)
    {
        if (!isset($this->locks[$key])) {
            throw new InvalidArgumentError('No lock was set on the given key.');
        }

        $awaitable = $this->locks[$key];
        unset($this->locks[$key]);
        $awaitable->resolve();
    }
protected function unlock ( string $ key ) { if ( ! isset ( $ this -> locks [ $ key ] ) ) { throw new InvalidArgumentError ( 'No lock was set on the given key.' ) ; } $ awaitable = $ this -> locks [ $ key ] ; unset ( $ this -> locks [ $ key ] ) ; $ awaitable -> resolve ( ) ; }
Unlocks the given key. Throws if the key was not locked.

@param string $key

@throws \Icicle\Exception\InvalidArgumentError
Unlocks the given key . Throws if the key was not locked .