function lock_release
Same name and namespace in other branches
- 6.x drupal-6.x/includes/lock-install.inc \lock_release()
- 6.x drupal-6.x/includes/lock.inc \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
10 calls to lock_release()
- DrupalCacheArray::set in drupal-7.x/
includes/ bootstrap.inc - Writes a value to the persistent cache immediately.
- drupal_cron_run in drupal-7.x/
includes/ common.inc - Executes a cron run when called.
- image_style_deliver in drupal-7.x/
modules/ image/ image.module - Page callback: Generates a derivative, given a style and image path.
- locale in drupal-7.x/
modules/ locale/ locale.module - Provides interface translation services.
- LockFunctionalTest::testLockAcquire in drupal-7.x/
modules/ simpletest/ tests/ lock.test - Confirm that we can acquire and release locks in two parallel requests.
Archivo
- drupal-7.x/
includes/ lock.inc, line 247 - A database-mediated implementation of a locking mechanism.
Código
function lock_release($name) {
global $locks;
unset($locks[$name]);
db_delete('semaphore')->condition('name', $name)->condition('value', _lock_id())->execute();
}