2.0.0
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 🏗
- 56: [2.x] Improve template types thanks to @WyriHaximus
Dependencies 📦,Enhancement ✨
- 54: Down bump to PHP 8.1 thanks to @WyriHaximus
Dependencies 📦
- 51: Bump composer/composer from 2.6.6 to 2.7.0 thanks to @dependabot[bot]
- 47: PHP 8.2 plus thanks to @WyriHaximus
- 45: Update dependency react/event-loop to v1.4.0 - autoclosed thanks to @renovate[bot]
- 35: Bump composer/composer from 1.10.21 to 1.10.22 thanks to @dependabot[bot]