acquire($name, $timeout); } /** * Wait for a lock to be available. * * This function may be called in a request that fails to acquire a desired * lock. This will block further execution until the lock is available or the * specified delay in seconds is reached. This should not be used with locks * that are acquired very frequently, since the lock is likely to be acquired * again by a different request while waiting. * * @param $name * The name of the lock. * @param $delay * The maximum number of seconds to wait, as an integer. * * @return * TRUE if the lock holds, FALSE if it is available. * * @deprecated */ function lock_wait($name, $delay = 30) { return lock()->wait($name, $delay); } /** * Release a lock previously acquired by lock_acquire(). * * This will release the named lock if it is still held by the current request. * * @param $name * The name of the lock. * * @deprecated */ function lock_release($name) { lock()->release($name); } /** * Release all previously acquired locks. * * @deprecated */ function lock_release_all($lock_id = NULL) { lock()->releaseAll($lock_id); } /** * @} End of "defgroup lock". */