Signals that the number of jobs waiting to be executed has reached the maximum allowed number.
Signals that the number of jobs waiting to be executed has reached the maximum allowed number. See Limiter.start
Summoner
Returns an F[A]
which represents the action of submitting
fa
to the Limiter with the given priority, and waiting for
its result.
Returns an F[A]
which represents the action of submitting
fa
to the Limiter with the given priority, and waiting for
its result. A higher number means a higher priority. The
default is 0.
The semantics of await
are blocking: the returned F[A]
only completes when job
has finished its execution,
returning the result of job
or failing with the same error
job
failed with. However, the blocking is only semantic, no
actual threads are blocked by the implementation.
This method is designed to be called concurrently: every concurrent call submits a job, and they are all started at a rate which is no higher then the maximum rate you specify when constructing a Limiter.
Creates a no-op Limiter, with no rate limiting and a synchronous
submit
method.
Creates a no-op Limiter, with no rate limiting and a synchronous
submit
method. pending
is always zero.
interval
is set to zero and changes to it have no effect.
Creates a new Limiter and starts processing the jobs
submitted so it, which are started at a rate no higher
than maxRate
.
Creates a new Limiter and starts processing the jobs
submitted so it, which are started at a rate no higher
than maxRate
.
Additionally, n
allows you to place a bound on the maximum
number of jobs allowed to queue up while waiting for
execution. Once this number is reached, the F
returned by
any call to the Limiter will immediately fail with a
LimitReachedException, so that you can in turn signal for
backpressure downstream. Processing restarts as soon as the
number of jobs waiting goes below n
again.
n
defaults to Int.MaxValue
if not specified.