Registry / utility / symfony-lock

symfony-lock

JSON →
library8.1.0phppackagistunverified

Creates and manages locks, a mechanism to provide exclusive access to a shared resource

composer require symfony/lock
INSTALL
IMPORT
SIG · SYMFONY-LOCK
S
symfony-lock
utilityphpv8.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

LockFactory
use Symfony\Component\Lock\LockFactory;

Create and acquire a lock

<?php require 'vendor/autoload.php'; use Symfony\Component\Lock\LockFactory; use Symfony\Component\Lock\Store\FlockStore; $store = new FlockStore(); $factory = new LockFactory($store); $lock = $factory->createLock('resource-name'); $lock->acquire(true); // blocking
Debug
Known issues
gotchaLock stores have different behaviors (blocking vs non-blocking)
fix
Check store documentation for acquire() behavior
affects: >=5.0
Upgrade
Version history
8.1.0latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Resources
symfony-lock — pip install symfony-lock · libregistry