2017 © Pedro Peláez
 

library php-simple-lock

A simple PHP advisory lock implementation. Uses flock() internally.

image

lyoshenka/php-simple-lock

A simple PHP advisory lock implementation. Uses flock() internally.

  • Monday, January 19, 2015
  • by lyoshenka
  • Repository
  • 1 Watchers
  • 1 Stars
  • 32 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

php-simple-lock

Install

"require": {
  "lyoshenka/php-simple-lock": "~1.0"
}

or from the command-line:, (*1)

composer require lyoshenka/php-simple-lock

Usage

use SimpleLock\Lock;

$lock = Lock::acquire('lockname');
if ($lock)
{
  // lock acquired. protected code goes here.

  Lock::release($lock);
}

If you want to change the location where lockfiles are stored:, (*2)

Lock::setLockDir('/path/to/lock/dir');

Bugs/Fixes

File issues here, submit pull requests, or email me: alex@grin.io, (*3)

The Versions

19/01 2015

dev-master

9999999-dev

A simple PHP advisory lock implementation. Uses flock() internally.

  Sources   Download

The Requires

  • php >=5.3.3

 

by Alex Grintsvayg

php lock locking lockfile

19/01 2015

1.0

1.0.0.0

A simple PHP advisory lock implementation. Uses flock() internally.

  Sources   Download

The Requires

  • php >=5.3.3

 

by Alex Grintsvayg

php lock locking lockfile