hope/locker

Process locker

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

This package is not auto-updated.

Last update: 2020-05-15 17:05:51 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();