Skip to content

2.0.0

Choose a tag to compare

@github-actions github-actions released this 10 Feb 19:19
2a6b40d

Fully reworked the public facing API to utilize fibers:

From:

$loop = Factory::create();

$finite = new Limited(
    new Infinite($loop, new EventLoopBridge($loop), 1), // Another pool, preferably an inifinite pool
    100 // The amount of threads to start and keep running
);
$time = time();
$finite->run(function (int $time): int {
    return $time;
}, [$time])->then(function (int $time): void {
    echo 'Unix timestamp: ', $time, PHP_EOL;
})->done();

To:

use React�ventLoop\Loop;
use ReactParallel�ventLoop�ventLoopBridge;
use ReactParallel\Pool\Infinite\Infinite;
use ReactParallel\Pool\Limited\Limited;
use function React\Async�sync;

$limited = new Limited(
    new Infinite(new EventLoopBridge(), 1), // Another pool, preferably an inifinite pool
    100 // The amount of threads to start and keep running
);
$time = time();

Loop::futureTick(async(static function () use ($limited, $time) {
    echo 'Unix timestamp: ', $limited->run(function (int $time): int {
        return $time;
    }, [$time]), $time, PHP_EOL;
}));

2.0.0

  • Total issues resolved: 0
  • Total pull requests resolved: 9
  • Total contributors: 3

Bug 🐞

Dependencies 📦,Feature 🏗

Dependencies 📦,Enhancement ✨

Dependencies 📦

Enhancement ✨