You are here

public function Predis::releaseAll in Redis 8

Releases all locks for the given lock token identifier.

Parameters

string $lockId: (optional) If none given, remove all locks from the current page. Defaults to NULL.

Overrides LockBackendInterface::releaseAll

File

src/Lock/Predis.php, line 123

Class

Predis
Predis lock backend implementation.

Namespace

Drupal\redis\Lock

Code

public function releaseAll($lock_id = NULL) {

  // We can afford to deal with a slow algorithm here, this should not happen
  // on normal run because we should have removed manually all our locks.
  foreach ($this->locks as $name => $foo) {
    $this
      ->release($name);
  }
}