2017 © Pedro Peláez
 

symfony-bundle semaphore-bundle

This bundle integrates semaphore library into symfony

image

zerkalica/semaphore-bundle

This bundle integrates semaphore library into symfony

  • Monday, October 22, 2012
  • by zerkalica
  • Repository
  • 2 Watchers
  • 2 Stars
  • 1,488 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Millwright semaphore bundle

Integrates zerkalica/semaphore library into Symfony2., (*1)

Configuration options (config.yaml):, (*2)

``` yaml millwright_semaphore: try_count: 5 # try count, if lock not acquired sleep_time: 1 #sleep time in seconds, if lock not acquired adapter: millwright_semaphore.adapter.apc # semaphore adapter name #predefined adapters: # millwright_semaphore.adapter.doctrine # millwright_semaphore.adapter.apc # millwright_semaphore.adapter.sem # millwright_semaphore.adapter.flock namespace: millwright_semaphore # lock keys namespace, (*3)


Usage: ``` php /** @var $semaphore \Millwright\Semaphore\Model\SemaphoreManagerInterface */ $semaphore = $container->get('millwright_semaphore.manager'); $handle = $semaphore->acquire('lock key or object', 60 /* lock expire time in seconds */); // Do something thread-safe $semaphore->release($handle);

The Versions

22/10 2012

dev-master

9999999-dev

This bundle integrates semaphore library into symfony

  Sources   Download

MIT

The Requires

 

by Stefan Zerkalica

util