Skip to content
Closed
No due date
Closed Feb 10, 2025
100% complete

Fully reworked the public facing API to utilize fibers:

From:

use React\EventLoop\Factory;
use ReactParallel\EventLoop\EventLoopBridge;
use ReactParallel\Pool\Infinite\Infinite;

$loop = Factory::create();
$infinite = new Infinite($loop, new EventLoopBridge($loop), 1);
$infinite->run(function () {
    sleep(1);

    return 'Hoi!';
})->then(function (string $message) use ($infinite) {
    echo $message, PHP_EOL;
    $infinite->close();
});
$loop->run();

To:

use ReactParallel\EventLoop\EventLoopBridge;
use ReactParallel\Pool\Infinite\Infinite;

$infinite = new Infinite(new EventLoopBridge(), 1);

Loop::futureTick(async(static function () use ($infinite) {
    echo $infinite->run(function () {
        sleep(1);

        return 'Hoi!';
    }), PHP_EOL;
    $infinite->close();
});

List view

    There are no open issues in this milestone

    Add issues to milestones to help organize your work for a particular release or project. Find and add issues with no milestones in this repo.