You are here

function memcache_test_lock_acquire in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 modules/memcache/tests/memcache_test.module \memcache_test_lock_acquire()

Try to acquire a named lock and report the outcome.

2 string references to 'memcache_test_lock_acquire'
MemcacheLockFunctionalTest::testLockAcquire in modules/memcache/tests/memcache-lock.test
Confirm that we can acquire and release locks in two parallel requests.
memcache_test_menu in modules/memcache/tests/memcache_test.module
Implements hook_menu().

File

modules/memcache/tests/memcache_test.module, line 66

Code

function memcache_test_lock_acquire() {
  if (lock_acquire('memcache_test_lock_acquire')) {
    lock_release('memcache_test_lock_acquire');
    return 'TRUE: Lock successfully acquired in memcache_test_lock_acquire()';
  }
  else {
    return 'FALSE: Lock not acquired in memcache_test_lock_acquire()';
  }
}