Tags: reactphp-parallel/limited-pool
Tags
Fully reworked the public facing API to utilize fibers:
From:
```php
$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:
```php
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 🐞
-----
- [50: Pass NULL into deferred resolve call](#50) thanks to @WyriHaximus
Dependencies 📦,Feature 🏗
------------------------
- [56: [2.x] Improve template types](#56) thanks to @WyriHaximus
Dependencies 📦,Enhancement ✨
----------------------------
- [54: Down bump to PHP 8.1](#54) thanks to @WyriHaximus
Dependencies 📦
--------------
- [51: Bump composer/composer from 2.6.6 to 2.7.0](#51) thanks to @dependabot[bot]
- [47: PHP 8.2 plus](#47) thanks to @WyriHaximus
- [45: Update dependency react/event-loop to v1.4.0 - autoclosed](#45) thanks to @renovate[bot]
- [35: Bump composer/composer from 1.10.21 to 1.10.22](#35) thanks to @dependabot[bot]
Enhancement ✨
-------------
- [58: [2.x] Ensure all examples are working as expected are run everything in a fiber - Part II - The quest for the missing readme update](#58) thanks to @WyriHaximus
- [57: [2.x] Ensure all examples are working as expected are run everything …](#57) thanks to @WyriHaximus