Registry / async / amphp-parallel-functions

amphp-parallel-functions

JSON →
library2.0.0phppackagistunverified

Parallel processing made simple.

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

parallel
use Amp\ParallelFunctions\parallel;

Run a function in parallel using Amp

use function Amp\ParallelFunctions\parallel; $result = parallel(function() { return 2 + 2; }); echo $result->await(); // 4
Debug
Known issues
gotchaRequires the amphp/amp event loop to be running.
fix
Ensure Amp\Loop::run() is called or use within an Amp context.
affects: >=2.0.0
Upgrade
Version history
2.0.0latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
37 hits · last 30 days
node
36
Resources
amphp-parallel-functions — pip install amphp-parallel-functions · libregistry