switon / sync
Channels, mutexes, and synchronization primitives for Switon Framework
v1.0.0
2026-05-09 16:24 UTC
Requires
- php: >=8.3
- switon/core: ^1.0
Requires (Dev)
- switon/testing: ^1.0
README
Channels, mutexes, and synchronization primitives for Switon Framework.
Installation
composer require switon/sync
Requirements: PHP 8.3+
Quick Start
use Switon\Sync\Channel; use Switon\Sync\WaitGroup; $channel = new Channel(10); $channel->push('task-1'); $task = $channel->pop(); // 'task-1' $wg = WaitGroup::of(2); // task A $wg->done(); // task B $wg->done(); $wg->wait();
Docs: https://docs.switon.dev/latest/sync
License
MIT.