Registry / utility / malkusch-lock

malkusch-lock

JSON →
library3.1.1phppackagistunverified

Mutex library for exclusive code execution, preventing race conditions.

composer require malkusch/lock
INSTALL
IMPORT
SIG · MALKUSCH-LOCK
M
malkusch-lock
utilityphpv3.1.1
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.

Mutex
use Malkusch\Lock\Mutex\Mutex;

Use a mutex to synchronize critical code sections.

use Malkusch\Lock\Mutex\Mutex; use Malkusch\Lock\Util\DoubleCheckedLocking; $mutex = new DoubleCheckedLocking('my_lock'); $mutex->synchronized(function () { // Critical section });
Debug
Known issues
gotchaRequires a backend like Redis or Flock for actual locking.
fix
Install and configure a backend (e.g., predis/predis for Redis).
affects: >=3.0.0
Upgrade
Version history
3.1.1latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
malkusch-lock — pip install malkusch-lock · libregistry