f3ath/forkrunner

A simple framework to run code in parallel processes

1.2.0 2017-10-03 20:16 UTC

This package is auto-updated.

Last update: 2024-11-05 05:31:26 UTC


README

A simple library to run a process in multiple processes

Installation

Via composer: $ composer require "f3ath/forkrunner"

Usage

<?php
$func = function ($n) {
    return $n * $n;
};
$runner = new \F3\ForkRunner\ForkRunner();
$args = [[3], [4], [5]];
$result = $runner->run($func, $args); // [9, 16, 25]