loevgaard / locker
This package is abandoned and no longer maintained.
The author suggests using the symfony/lock package instead.
PHP Process locker
v2.0.7
2017-02-16 13:43 UTC
Requires
- php: >=5.4.0
Requires (Dev)
- mikey179/vfsstream: 1.*
- phpunit/phpunit: 4.1.*
README
Largely inspired by HopeUA/Locker
Usage
$locker = new FileLocker('large-process', ['lockDir' => '/tmp/lock']);
if ($locker->isLocked()) {
die('Already locked');
}
$locker->lock();
... some code ...
$locker->unlock();