You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bug #38353 [RateLimiter] Call all compound limiters on failure and added IO blocking (wouterj)
This PR was merged into the 5.2-dev branch.
Discussion
----------
[RateLimiter] Call all compound limiters on failure and added IO blocking
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Two small improvements that I missed in #38257:
* Added `wait()` method, to be able to do logic like this:
```php
while (!($limit = $limiter->consume())->isAccepted()) {
$limit->wait();
}
```
* Fixed the `CompoundLimiter` to always call all limiters (even when one already blocks). This was the original behavior of the compound limiter and imho the best behavior (at least, it's always consistent and doesn't rely on the order of limiters - which is unsorted).
Commits
-------
0279f88 Call all compound limiters on failure and added IO blocking
0 commit comments