You are here

function lock_may_be_available in Memcache API and Integration 6

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

Check if lock acquired by a different process may be available.

If an existing lock has expired, it is removed.

Parameters

$name: The name of the lock.

Return value

TRUE if there is no lock or it was removed, FALSE otherwise.

File

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

Code

function lock_may_be_available($name) {
  return !dmemcache_get($name, 'semaphore');
}