nona-creative/pid-manager

PID manager to lock php file execution

Installs: 23 024

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 3

Forks: 0

Open Issues: 0

Type:lib

pkg:composer/nona-creative/pid-manager

v0.1.3 2015-12-17 06:37 UTC

This package is not auto-updated.

Last update: 2025-10-10 21:38:59 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();
    }
}