You are here

public static function UltimateCronLockMemcache::isLockedMultiple in Ultimate Cron 7.2

Check multiple locks.

Parameters

array $names: The names of the locks to check.

Return value

array Array of lock ids.

File

./ultimate_cron.memcache-lock.inc, line 189
A memcached-mediated implementation of a locking mechanism.

Class

UltimateCronLockMemcache
Class for handling lock functions.

Code

public static function isLockedMultiple($names) {
  $bin = variable_get('ultimate_cron_lock_memcache_bin', 'semaphore');
  $locks = dmemcache_get_multi($names, $bin);
  foreach ($names as $name) {
    if (!isset($locks[$name])) {
      $locks[$name] = FALSE;
    }
  }
  return $locks;
}