hope/locker

Process locker

v2.1.0 2017-04-13 14:21 UTC

This package is not auto-updated.

Last update: 2024-03-16 13:05:14 UTC


README

Test passing Latest Stable Version

Usage

$locker = new FileLocker('large-process', ['lockDir' => '/tmp/lock']);
if ($locker->isLocked()) {
    die('Already locked');
}

$locker->lock();
... some code ...
$locker->unlock();