function lock_release

7.x lock_release($name)
6.x lock_release($name)
6.x lock_release($name)

Release a lock previously acquired by lock_acquire().

This will release the named lock if it is still held by the current request.


$name: The name of the lock.

Related topics

16 calls to lock_release()
DrupalCacheArray::set in drupal/includes/
Writes a value to the persistent cache immediately.
drupal_cron_run in drupal/includes/
Executes a cron run when called.
FieldInfo::getBundleExtraFields in drupal/modules/field/
Retrieves the "extra fields" for a bundle.
FieldInfo::getBundleInstances in drupal/modules/field/
Retrieves the instances for a bundle.
FieldInfo::getFieldMap in drupal/modules/field/
Collects a lightweight map of fields across bundles.

... See full list


drupal/includes/, line 247
A database-mediated implementation of a locking mechanism.


function lock_release($name) {
  global $locks;

  db_delete('semaphore')->condition('name', $name)->condition('value', _lock_id())->execute();