https://github.com/hopeua/locker
PHP lib for process locking
https://github.com/hopeua/locker
locker php
Last synced: 6 months ago
JSON representation
PHP lib for process locking
- Host: GitHub
- URL: https://github.com/hopeua/locker
- Owner: hopeua
- License: mit
- Created: 2014-06-01T22:02:36.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2017-04-13T14:26:31.000Z (about 9 years ago)
- Last Synced: 2024-02-25T01:46:44.449Z (over 2 years ago)
- Topics: locker, php
- Language: PHP
- Homepage:
- Size: 39.1 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Process Locker for PHP scripts
[](https://travis-ci.org/HopeUA/locker)
[](https://packagist.org/packages/hope/locker)
## Usage
$locker = new FileLocker('large-process', ['lockDir' => '/tmp/lock']);
if ($locker->isLocked()) {
die('Already locked');
}
$locker->lock();
... some code ...
$locker->unlock();