amphp/parallel-functions

Parallel processing made simple.

Fund package maintenance!
amphp

Installs: 279 703

Dependents: 21

Suggesters: 2

Security: 0

Stars: 156

Watchers: 11

Forks: 9

Open Issues: 1

v1.0.0 2020-07-10 17:05 UTC

This package is auto-updated.

Last update: 2020-10-03 18:07:00 UTC


README

Build Status License

Installation

This package can be installed as a Composer dependency.

composer require amphp/parallel-functions

Requirements

  • PHP 7.0+

Documentation

Documentation can be found on amphp.org as well as in the ./docs directory.

Example

<?php

use function Amp\ParallelFunctions\parallelMap;
use function Amp\Promise\wait;

$responses = wait(parallelMap([
    'https://google.com/',
    'https://github.com/',
    'https://stackoverflow.com/',
], function ($url) {
    return file_get_contents($url);
}));

Further examples can be found in the ./examples directory.

Versioning

amphp/parallel-functions follows the semver semantic versioning specification like all other amphp packages.

Security

If you discover any security related issues, please email me@kelunik.com instead of using the issue tracker.

License

The MIT License (MIT). Please see LICENSE for more information.