LockHandler (Component\Filesystem)
Symfony\Component\Filesystem\LockHandler
class LockHandler
LockHandler class provides a simple abstraction to lock anything by means of a file lock.
A locked file is created based on the lock name when calling lock(). Other lock handlers will not be able to lock the same name until it is released (explicitly by calling release() or implicitly when the instance holding the lock is destroyed).
Methods
__construct(string $name, string|null $lockPath = null) | ||
bool | lock(bool $blocking = false) Lock the resource. | |
release() Release the resource. |
Details
public __construct(string $name, string|null $lockPath = null)
public bool lock(bool $blocking = false)
Lock the resource.
public release()
Release the resource.
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.0/Symfony/Component/Filesystem/LockHandler.html