Release all locks.

{@inheritdoc}
504116
public function cleanup()
    {
        try {
            foreach ($this->locks as $lock) {
                $lock->release();
            }
        } catch (LockReleasingException $e) {
            // noop
        } finally {
            $this->locks = [];
        }
    }
303363
protected function unlock()
    {
        if (null !== $this->lockKey) {
            $this->client->del($this->lockKey);
            $this->lockKey = null;
        }
    }
446232
@Override
    public synchronized void releaseWriteLock(final Lock lock) {
        if (lock == null || lock.name == null || lock.name.isEmpty()) {
            throw new InvalidArgument("lock is invalid");
        }

        locks.remove(lock.name);

        final File writeLock = getWriteLock();
        if (!writeLock.delete()) {
            throw new IllegalStateException(
                    "write lock could not be deleted");
        }
    }
22987
public void unlock_all() {
    if( _key != null )
      for (Key k : _lockers) new UnlockSafe(k).invoke(_key);
  }
430448
public function release() {
        if ($this->isAquired()) {
            $hFile = self::$hFiles[$this->filename];
            if (!flock($hFile, LOCK_UN)) throw new RuntimeException('Can not release lock on file "'.$this->filename.'"');
            unset(self::$hFiles[$this->filename]);
            fclose($hFile);
        }
    }
1360070
public void releaseAll() {
        synchronized(this) {
            Object[] refSet = allocatedMemoryReferences.values().toArray();
            if(refSet.length != 0) {
                logger.finer("Releasing allocated memory regions");
            }
            for(Object ref : refSet) {
                release((MemoryReference) ref);
            }
        }
    }
485067
@Override
  public void release(T resource) {
    if (resource != null) {
      mResources.add(resource);
      try (LockResource r = new LockResource(mTakeLock)) {
        mNotEmpty.signal();
      }
    }
  }
152089
@Override
    protected void onSessionClose(long sessionId, Map<Long, Object> responses) {
        removeInvocationRefUids(sessionId);

        if (owner != null && owner.sessionId() == sessionId) {
            ReleaseResult result = doRelease(owner.endpoint(), newUnsecureUUID(), lockCount);
            for (LockInvocationKey key : result.completedWaitKeys()) {
                responses.put(key.commitIndex(), result.ownership().getFence());
            }
        }
    }
1307480
public function release($key)
    {
        $key = (string) $key;
        if (isset($this->semaphores[$key])) {
            $sem = $this->semaphores[$key];
            unset($this->semaphores[$key]);
            if (is_resource($sem)) {
                @sem_release($sem);
            }
            $filename = $this->getFilenameForMutexKey($key);
            if (is_file($filename)) {
                @unlink($filename);
            }
        }
    }
1267844
protected function _lock($object, $lock)
    {
        if ($lock) {
            self::$_locks[$object->getHandle()] = true;
        } else {
            unset(self::$_locks[$object->getHandle()]);
        }
    }
64221
public function unlock(): bool
    {
        $result = false;

        if ($this->locker->releaseLock()) {
            $result = true;
        }

        return $result;
    }
445732
public void releaseAllResources()
    {
        synchronized (poolSynch)
        {
            Collection pools = poolMap.values();
            poolMap = new HashMap(poolMap.size());
            ObjectPool op = null;
            for (Iterator iterator = pools.iterator(); iterator.hasNext();)
            {
                try
                {
                    op = ((ObjectPool) iterator.next());
                    op.close();
                }
                catch (Exception e)
                {
                    log.error("Exception occured while closing pool " + op, e);
                }
            }
        }
        super.releaseAllResources();
    }
790231
private synchronized static void releaseWakeLock() {
        if (sWakeLock != null) {
            if (sWakeLock.isHeld()) {
                sWakeLock.release();

                // Clear static reference if the lock is no longer held after the release() call.
                if (!sWakeLock.isHeld()) {
                    sWakeLock = null;
                }
            } else {
                // The lock is not held, just clear the static reference.
                sWakeLock = null;
            }
        }

        sLogger.log(WingsService.class, "releaseWakeLock", "sWakeLock=" + sWakeLock);
    }
442399
public function unlock(object $document) : void
    {
        $id          = $this->uow->getDocumentIdentifier($document);
        $criteria    = ['_id' => $this->class->getDatabaseIdentifierValue($id)];
        $lockMapping = $this->class->fieldMappings[$this->class->lockField];
        assert($this->collection instanceof Collection);
        $this->collection->updateOne($criteria, ['$unset' => [$lockMapping['name'] => true]]);
        $this->class->reflFields[$this->class->lockField]->setValue($document, null);
    }
23599
public function releaseLock($name)
    {
        if (isset($this->locks[$name])) {
            rmdir($this->getDirectoryPath($name));
            unset($this->locks[$name]);

            return true;
        }

        return false;
    }
127441
protected function release()
    {
        // Call send in non-blocking mode. If the call fails because the queue
        // is full, then the number of locks configured is too large.
        if (!@msg_send($this->queue, 1, "\0", false, false, $errno)) {
            if ($errno === MSG_EAGAIN) {
                throw new SemaphoreException('The semaphore size is larger than the system allows.');
            }

            throw new SemaphoreException('Failed to release the lock.');
        }
    }
1226399
public function releaseLock( $key )
    {
        if ( strlen( $key ) > self::MAX_KEY_LENGTH )
        {
            throw new ezcCacheInvalidKeyException( $key, 'Length > ' . self::MAX_KEY_LENGTH . '.' );
        }

        $this->memcache->delete( $key );
    }