2017 © Pedro Peláez
 

library lock

Simple lockfile management class.

image

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

The README.md

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 ] )

The Versions

16/07 2014

dev-develop

dev-develop

Simple lockfile management class.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

16/07 2014

dev-master

9999999-dev

Simple lockfile management class.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

16/07 2014

1.0.0

1.0.0.0

Simple lockfile management class.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires