public function LockBackendInterface::wait

Waits a short amount of time before a second lock acquire attempt.

While this method is subject to have a generic implementation in abstract backend implementation, some backends may provide non blocking or less I/O intensive wait mecanism: this is why this method remains on the backend interface.

Parameters

string $name: Lock name currently being locked.

int $delay = 30: Miliseconds to wait for.

Return value

bool TRUE if the wait operation was successful and lock may be available. You still need to acquire the lock manually and it may fail again.

2 methods override LockBackendInterface::wait()
LockBackendAbstract::wait in drupal/core/lib/Drupal/Core/Lock/LockBackendAbstract.php
Implements Drupal\Core\Lock\LockBackedInterface::wait().
NullLockBackend::wait in drupal/core/lib/Drupal/Core/Lock/NullLockBackend.php
Implements Drupal\Core\Lock\LockBackedInterface::wait().

File

drupal/core/lib/Drupal/Core/Lock/LockBackendInterface.php, line 54
Definition of Drupal\Core\Lock\LockBackendInterface.

Class

LockBackendInterface
Lock backend interface.

Namespace

Drupal\Core\Lock

Code

public function wait($name, $delay = 30);