Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. DoctrineDbalPostgreSqlStore.php

function DoctrineDbalPostgreSqlStore::unlock

3 calls to DoctrineDbalPostgreSqlStore::unlock()
DoctrineDbalPostgreSqlStore::delete in vendor/symfony/lock/Store/DoctrineDbalPostgreSqlStore.php
Removes a resource from the storage.
DoctrineDbalPostgreSqlStore::saveRead in vendor/symfony/lock/Store/DoctrineDbalPostgreSqlStore.php
Stores the resource if it's not locked for reading by someone else.
DoctrineDbalPostgreSqlStore::waitAndSaveRead in vendor/symfony/lock/Store/DoctrineDbalPostgreSqlStore.php
Waits until a key becomes free for reading, then stores the resource.

File

vendor/symfony/lock/Store/DoctrineDbalPostgreSqlStore.php, line 238

Class

DoctrineDbalPostgreSqlStore
DoctrineDbalPostgreSqlStore is a PersistingStoreInterface implementation using PostgreSql advisory locks with a Doctrine DBAL Connection.

Namespace

Symfony\Component\Lock\Store

Code

private function unlock(Key $key) : void {
    do {
        $sql = "SELECT pg_advisory_unlock(objid::bigint) FROM pg_locks WHERE locktype='advisory' AND mode='ExclusiveLock' AND objid=:key AND pid=pg_backend_pid()";
        $result = $this->conn
            ->executeQuery($sql, [
            'key' => $this->getHashedKey($key),
        ]);
    } while (0 !== $result->rowCount());
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal