function lock_release

Release a lock previously acquired by lock_acquire().

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

Parameters

$name: The name of the lock.

Related topics

17 calls to lock_release()
DrupalCacheArray::set in includes/bootstrap.inc
Writes a value to the persistent cache immediately.
DrupalWebTestCase::storeSetupCache in modules/simpletest/drupal_web_test_case.php
Store the installation setup to a cache.
drupal_cron_run in includes/common.inc
Executes a cron run when called.
FieldInfo::getBundleExtraFields in modules/field/field.info.class.inc
Retrieves the "extra fields" for a bundle.
FieldInfo::getBundleInstances in modules/field/field.info.class.inc
Retrieves the instances for a bundle.

... See full list

File

includes/lock.inc, line 266

Code

function lock_release($name) {
    global $locks;
    unset($locks[$name]);
    db_delete('semaphore')->condition('name', $name)
        ->condition('value', _lock_id())
        ->execute();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.