| |
- builtins.object
-
- RateLimiter
class RateLimiter(builtins.object) |
|
RateLimiter(period_ns: int, **kwargs) -> None
A class for limiting the rate of runtime work. |
|
Methods defined here:
- __call__(self, time_ns: int = None, task: Callable[[], NoneType] = None) -> bool
- Query the limiter to determine if the current time would allow a
governed task to run.
- __init__(self, period_ns: int, **kwargs) -> None
- Initialize this rate-limiter.
Readonly properties defined here:
- rate_hz
- Get the underlying rate that this limiter is governing. This is useful
to determine if the rate limitation is or isn't impacting the rate of
some task.
Data descriptors defined here:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
| |