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;List view
0 issues of 12 selected
- Status: Merged (completed).reactphp-parallel/runtimenumber 68#68ย In reactphp-parallel/runtime;
- Status: Merged (completed).reactphp-parallel/runtimenumber 61#61ย In reactphp-parallel/runtime;
- Status: Merged (completed).reactphp-parallel/runtimenumber 62#62ย In reactphp-parallel/runtime;
- Status: Merged (completed).reactphp-parallel/runtimenumber 55#55ย In reactphp-parallel/runtime;
- Status: Merged (completed).reactphp-parallel/runtimenumber 56#56ย In reactphp-parallel/runtime;
- Status: Merged (completed).reactphp-parallel/runtimenumber 59#59ย In reactphp-parallel/runtime;
- Status: Merged (completed).reactphp-parallel/runtimenumber 58#58ย In reactphp-parallel/runtime;
- Status: Merged (completed).reactphp-parallel/runtimenumber 67#67ย In reactphp-parallel/runtime;
- Status: Merged (completed).reactphp-parallel/runtimenumber 66#66ย In reactphp-parallel/runtime;
- Status: Merged (completed).reactphp-parallel/runtimenumber 65#65ย In reactphp-parallel/runtime;
- Status: Merged (completed).reactphp-parallel/runtimenumber 14#14ย In reactphp-parallel/runtime;
- Status: Merged (completed).reactphp-parallel/runtimenumber 13#13ย In reactphp-parallel/runtime;