You are here

function lock_may_be_available in Memcache API and Integration 7

Same name and namespace in other branches
  1. 6 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

string $name: The name of the lock.

Return value

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

File

./memcache-lock-code.inc, line 77
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');
}