Registry / async / amphp-parallel

amphp-parallel

JSON →
library2.3.3phppackagistunverified

Parallel processing component for Amp.

composer require amphp/parallel
INSTALL
IMPORT
SIG · AMPHP-PARALLEL
A
amphp-parallel
asyncphpv2.3.3
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.

DefaultWorkerPool
use Amp\Parallel\Worker\DefaultWorkerPool;

Enqueues a task to a worker pool and prints the result.

<?php require_once 'vendor/autoload.php'; use Amp\Parallel\Worker\DefaultWorkerPool; use Amp\Loop; Loop::run(function () { $pool = new DefaultWorkerPool(); $result = yield $pool->enqueue(function () { return 'Hello from worker'; }); echo $result; });
Debug
Known issues
breakingRequires PHP 8.1+ and the amphp/amp library.
fix
Ensure PHP version >= 8.1 and install amphp/amp.
affects: >=2.0.0
Upgrade
Version history
2.3.3latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
39 hits · last 30 days
node
34
OpenAI (training)
1
Resources
amphp-parallel — pip install amphp-parallel · libregistry