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\StoreCode
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());
}