function LockInterface::acquire
Acquires the lock. If the lock is acquired by someone else, the parameter `blocking` determines whether or not the call should block until the release of the lock.
Throws
LockConflictedException If the lock is acquired by someone else in blocking mode
LockAcquiringException If the lock cannot be acquired
2 methods override LockInterface::acquire()
- Lock::acquire in vendor/
symfony/ lock/ Lock.php - Acquires the lock. If the lock is acquired by someone else, the parameter `blocking` determines whether or not the call should block until the release of the lock.
- NoLock::acquire in vendor/
symfony/ lock/ NoLock.php - Acquires the lock. If the lock is acquired by someone else, the parameter `blocking` determines whether or not the call should block until the release of the lock.
File
-
vendor/
symfony/ lock/ LockInterface.php, line 32
Class
- LockInterface
- LockInterface defines an interface to manipulate the status of a lock.
Namespace
Symfony\Component\LockCode
public function acquire(bool $blocking = false) : bool;