package lwt
Promises and event-driven I/O
Install
Dune Dependency
Authors
Maintainers
Sources
5.0.1.tar.gz
sha256=b54c78ef2b7a47c94d6ef8c93333b474b2f8ad912f9208cc94dbca44612e9fc9
md5=70d107a5ff1247840e8012b6a3793c15
doc/lwt.unix/Lwt_throttle/module-type-S/index.html
Module type Lwt_throttle.S
val create : rate:int -> max:int -> n:int -> t
Creates a rate limiter.
Lwt_throttle.wait limiter channel
returns a new promise associated with the given rate limiter and channel.
If the maximum number of pending promises for limiter
has not been reached, the promise starts pending. It will be resolved with true
at some future time, such that the rate limit of limiter
is not exceeded, with respect to other promises in the same channel
.
If the maximum number of pending promises has been reached, the returned promise is already resolved with false
.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>