nona-creative / pid-manager
PID manager to lock php file execution
Installs: 20 752
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 4
Forks: 0
Open Issues: 0
Type:lib
Requires
- php: >=5.5.0
This package is not auto-updated.
Last update: 2024-10-25 16:30:29 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(); } }