nona-creative / pid-manager
PID manager to lock php file execution
v0.1.3
2015-12-17 06:37 UTC
Requires
- php: >=5.5.0
This package is not auto-updated.
Last update: 2026-02-27 23:55:41 UTC
README
PID manager to lock php file execution.
Installation
Install the latest version
composer require nona-creative/pid-manager
Basic Usage
<?php $pidManager = new \Nona\PidManager('test.lock', './'); $pidManager->withLock(function() { // Do your processing here // ... });
<?php $pidManager = new \Nona\PidManager('test.lock', './'); if (!$pidManager->isLocked()) { try { $pidManager->lock(); // Do your processing here // ... } finally { $pidManager->unlock(); } }