class RateLimiter::MultiLimiter
- RateLimiter::MultiLimiter
- Reference
- Object
Overview
A rate limiter combining multiple Limiter
s.
A MultiLimter tries to acquire tokens from limiters producing at the lowest rate first. This mitigates the scenario where tokens are acquired and then wasted due to a single rate limiter timing out.
Included Modules
Defined in:
rate_limiter.crConstructors
Instance Method Summary
- #get(max_wait : Time::Span) : Token | Timeout
-
#get : Token
Returns a
Token
as soon as available.
Instance methods inherited from module RateLimiter::LimiterLike
get(max_wait : Time::Span) : Token | Timeoutget : Token get, get!(max_wait : Time::Span) : Token
get! : Token get!, get? : Token? get?
Constructor Detail
Instance Method Detail
Description copied from module RateLimiter::LimiterLike
Returns a Token
if one is available within max_wait
time,
otherwise it returns a Timeout
. Blocking.
Description copied from module RateLimiter::LimiterLike
Returns a Token
as soon as available. Blocking.