stekycz/critical-section

Lightweight class supporting critical section locking

Maintainers

Package info

github.com/stekycz/CriticalSection

Issues

pkg:composer/stekycz/critical-section

Statistics

Installs: 36 899

Dependents: 1

Suggesters: 0

Stars: 1

v2.1.0 2020-09-17 23:36 UTC

This package is not auto-updated.

Last update: 2026-03-01 10:31:26 UTC


README

Description

Lightweight class supporting critical section locking in PHP.

It requires PHP >= 7.1 and no other dependency.

Example

$pdo = new PDO('...');
$driver = new Bileto\CriticalSection\Driver\PdoPgsqlDriver($pdo);
$criticalSection = new Bileto\CriticalSection\CriticalSection($driver);

$criticalSection->enter('Section Label');

// Perform set of steps of critical tasks

$criticalSection->leave('Section Label');