Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PID Manager

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();
    }
}

About

Process ID manager for PHP

Resources

Stars

1 star

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages