LoadBalancer class
A pool of runners, ordered by load.
Keeps a pool of runners, and allows running function through the runner with the lowest current load.
- Implemented types
Constructors
-
LoadBalancer(Iterable<
Runner> runners) -
Create a load balancer backed by the Runners of
runners
.
Properties
Methods
-
close(
) → Future< void> -
Stop the runner.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
run<
R, P> (FutureOr< R> function(P argument), P argument, {Duration? timeout, FutureOr<R> onTimeout()?, int load = 100}) → Future<R> -
Execute the command in the currently least loaded isolate.
override
-
runMultiple<
R, P> (int count, FutureOr< R> function(P argument), P argument, {Duration? timeout, FutureOr<R> onTimeout()?, int load = 100}) → List<FutureOr< R> > -
Execute the same function in the least loaded
count
isolates. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited