Skip to content

Latest commit

 

History

History
21 lines (13 loc) · 602 Bytes

File metadata and controls

21 lines (13 loc) · 602 Bytes

Critical Sections for PHP Build Status

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');