2017 © Pedro Peláez
 

library sync

Synchronized function calls for PHP

image

morris/sync

Synchronized function calls for PHP

  • Monday, January 5, 2015
  • by morris
  • Repository
  • 1 Watchers
  • 3 Stars
  • 33 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Synchronization for PHP

<?php

// Call a function in a mutually exclusive way using a lockfile.
// A process will only block other processes and never block itself,
// so you can safely nest synchronized operations.

Sync::call( function() {

    // do critical stuff like IO here

} );

// Set default lockfile

Sync::$lock = 'my/default/.lock';

// Use different lockfile by passing it as the second argument

Sync::call( $func, 'my/other/.lock' );

Requirements

  • PHP 5.3+

Installation

The composer package name is morris/sync. You can also download or fork the repository., (*1)

License

Sync is licensed under the MIT License. See LICENSE.md for details., (*2)

The Versions

05/01 2015

dev-master

9999999-dev http://github.com/morris/sync

Synchronized function calls for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

concurrency synchronization synchronized

05/01 2015

v1.0.0

1.0.0.0 http://github.com/morris/sync

Synchronized function calls for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

concurrency synchronization synchronized