lock_release

Versions
7
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.

Parameters

$name The name of the lock.

Related topics

▾ 4 functions call lock_release()

image_style_generate in modules/image/image.module
Menu callback; Given a style and image path, generate a derivative.
locale in modules/locale/locale.module
Provides interface translation services.
menu_rebuild in includes/menu.inc
(Re)populate the database tables used by various menu functions.
system_test_lock_acquire in modules/simpletest/tests/system_test.module
Try to acquire a named lock and report the outcome.

Code

includes/lock.inc, line 224

<?php
function lock_release($name) {
  global $locks;

  unset($locks[$name]);
  db_delete('semaphore')
    ->condition('name', $name)
    ->condition('value', _lock_id())
    ->execute();
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.