library lock
Simple lockfile management class.
rych/lock
Simple lockfile management class.
- Wednesday, July 16, 2014
- by rchouinard
- Repository
- 2 Watchers
- 4 Stars
- 140 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 3 Forks
- 1 Open issues
- 3 Versions
- 1 % Grown
Rych Lock
Simple process lock management library., (*1)
Installation
Installation is best managed via Composer., (*2)
{
"require": {
"rych/lock": "1.0.*"
}
}
Or:, (*3)
composer require rych/lock=1.0.*
Usage
<?php
$lock = new \Rych\Lock\Lock("lock-name", "/path/to/locks");
if ($lock->lock()) {
// Do work here
} else {
die ("Unable to acquire lock! Make sure no other process is running!");
}
$lock->unlock();
Methods
- bool \Rych\Lock\Lock::__construct( string $name [, string $bucket = null ] )
- bool \Rych\Lock\Lock::lock( [ bool $block = false ] )
- bool \Rych\Lock\Lock::unlock()
- bool \Rych\Lock\Lock::check( [ string &$pidof = null ] )
dev-develop
dev-develop
Simple lockfile management class.
Sources
Download
MIT
The Requires
The Development Requires
dev-master
9999999-dev
Simple lockfile management class.
Sources
Download
MIT
The Requires
The Development Requires
1.0.0
1.0.0.0
Simple lockfile management class.
Sources
Download
MIT
The Requires
The Development Requires