call
inline suspend fun <R> call(permits: Int = 1, timeout: Duration = config.baseTimeoutDuration, block: Supplier<R>): R(source)
Decorates a Supplier with this rate limiter.
Parameters
permits
The number of permits required to execute the function.
timeout
The duration to wait for permits to be available.
block
The suspending function to decorate.
Throws
if the coroutine is cancelled while waiting for the permits to be available.
if the request is rejected due to the queue being full or the timeout for acquiring permits has expired.