You are here

public function DatabaseLockBackend::release in Service Container 7.2

Same name and namespace in other branches
  1. 7 lib/Drupal/Core/Lock/DatabaseLockBackend.php \Drupal\Core\Lock\DatabaseLockBackend::release()

Implements Drupal\Core\Lock\LockBackedInterface::release().

Overrides LockBackendInterface::release

File

lib/Drupal/Core/Lock/DatabaseLockBackend.php, line 120
Contains \Drupal\Core\Lock\DatabaseLockBackend.

Class

DatabaseLockBackend
Defines the database lock backend. This is the default backend in Drupal.

Namespace

Drupal\Core\Lock

Code

public function release($name) {
  unset($this->locks[$name]);
  $this->database
    ->delete('semaphore')
    ->condition('name', $name)
    ->condition('value', $this
    ->getLockId())
    ->execute();
}