function DoctrineDbalPostgreSqlStore::unlockShared
3 calls to DoctrineDbalPostgreSqlStore::unlockShared()
- DoctrineDbalPostgreSqlStore::delete in vendor/
symfony/ lock/ Store/ DoctrineDbalPostgreSqlStore.php - Removes a resource from the storage.
- DoctrineDbalPostgreSqlStore::save in vendor/
symfony/ lock/ Store/ DoctrineDbalPostgreSqlStore.php - Stores the resource if it's not locked by someone else.
- DoctrineDbalPostgreSqlStore::waitAndSave in vendor/
symfony/ lock/ Store/ DoctrineDbalPostgreSqlStore.php - Waits until a key becomes free, then stores the resource.
File
-
vendor/
symfony/ lock/ Store/ DoctrineDbalPostgreSqlStore.php, line 248
Class
- DoctrineDbalPostgreSqlStore
- DoctrineDbalPostgreSqlStore is a PersistingStoreInterface implementation using PostgreSql advisory locks with a Doctrine DBAL Connection.
Namespace
Symfony\Component\Lock\StoreCode
private function unlockShared(Key $key) : void {
do {
$sql = "SELECT pg_advisory_unlock_shared(objid::bigint) FROM pg_locks WHERE locktype='advisory' AND mode='ShareLock' AND objid=:key AND pid=pg_backend_pid()";
$result = $this->conn
->executeQuery($sql, [
'key' => $this->getHashedKey($key),
]);
} while (0 !== $result->rowCount());
}