You are here

function lock_release_all in Memcache API and Integration 7

Same name and namespace in other branches
  1. 6 memcache-lock-code.inc \lock_release_all()

Release all locks acquired by this request.

1 string reference to 'lock_release_all'
_lock_id in ./memcache-lock-code.inc
Generate a unique identifier for locks generated during this request.

File

./memcache-lock-code.inc, line 170
A memcache based implementation of a locking mechanism. See includes/lock.inc for documenation

Code

function lock_release_all($lock_id = NULL) {
  global $locks;
  foreach ($locks as $name => $id) {
    $value = dmemcache_get($name, 'semaphore');
    if ($value == $id) {
      dmemcache_delete($name, 'semaphore');
    }
  }
}