(acquire! this)
(acquire! this permits)
Acquire given number of permits. It will block until there are permits available.
Acquire given number of permits. It will block until there are permits available.
(try-acquire this)
(try-acquire this permits)
(try-acquire this permits wait-time)
Try to acquire given number of permits, allows blocking for at most wait-ms
milliseconds.
Return true if there are enough permits in permitted time.
Try to acquire given number of permits, allows blocking for at most `wait-ms` milliseconds. Return true if there are enough permits in permitted time.
(rate-limiter opts)
Create a default rate limiter with:
rate
: permits per secondmax-cached-tokens
: the max size of tokens that the bucket can cache when it's idleCreate a default rate limiter with: * `rate`: permits per second * `max-cached-tokens`: the max size of tokens that the bucket can cache when it's idle
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close