Skip to content

3.0.0

Closed Feb 9, 2025 100% complete

Fully reworked the runtime public facing API to utilize fibers:

From:

use React\EventLoop\Factory;
use ReactParallel\Runtime\Runtime;
use ReactParallel\FutureToPromiseConverter\FutureToPromiseConverter;

$loop = Factory::create();
$runtime = Runtime::create(new FutureToPromiseConverter($loop));

$runtime->run(function () {
    sleep(3);

    return 3;
})->d…

Fully reworked the runtime public facing API to utilize fibers:

From:

use React\EventLoop\Factory;
use ReactParallel\Runtime\Runtime;
use ReactParallel\FutureToPromiseConverter\FutureToPromiseConverter;

$loop = Factory::create();
$runtime = Runtime::create(new FutureToPromiseConverter($loop));

$runtime->run(function () {
    sleep(3);

    return 3;
})->done(function (int $int): void {
    echo $int, PHP_EOL;
});

$loop->run();

To:

use ReactParallel\Runtime\Runtime;
use ReactParallel\EventLoop\EventLoopBridge;

$runtime = Runtime::create(new EventLoopBridge());

echo $runtime->run(function (): int {
    sleep(3);

    return 3;
}), PHP_EOL;

This milestone is closed.

No open issues remain. View closed issues or see open milestones in this repository.