Registry / async / amphp-sync

amphp-sync

JSON →
library2.3.0phppackagistunverified

Non-blocking synchronization primitives for PHP based on Amp and Revolt.

composer require amphp/sync
INSTALL
IMPORT
SIG · AMPHP-SYNC
A
amphp-sync
asyncphpv2.3.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Semaphore
use Amp\Sync\Semaphore;

Create a semaphore to synchronize access to a resource.

<?php use Amp\Sync\Semaphore; $semaphore = new Semaphore(1); $lock = $semaphore->acquire(); // Critical section $lock->release();
Debug
Known issues
gotchaRequires the amphp/amp and revolt/event-loop packages to be installed.
fix
Install amphp/amp and revolt/event-loop via Composer.
affects: >=2.0.0
Upgrade
Version history
2.3.0latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
51 hits · last 30 days
node
46
Resources
amphp-sync — pip install amphp-sync · libregistry