WorkerPool class
Constructors
-
WorkerPool(List<
WorkerSocket> sockets)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- onMessageReceivedHandler ↔ Function?
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
sessions
→ Stream<
WorkerSession> -
no setter
-
sockets
→ List<
WorkerSocket> -
final
Methods
-
addMethod(
String name, Taker handler) → void -
callMethod(
String name, [dynamic argument]) → Future< List> -
createSession(
[dynamic initialMessage]) → Future< WorkerSession> -
distribute(
String name, [dynamic argument]) → Future -
divide(
String name, int count, {dynamic next()?, dynamic collect(List inputs)?}) → Future -
forEach(
void handler(WorkerSocket socket)) → void -
getAvailableWorker(
) → WorkerSocket -
getAvailableWorkerId(
) → int -
init(
) → Future< WorkerPool> -
listen(
void handler(int worker, dynamic event)) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
ping(
) → Future -
reduceWorkers(
int count) → void -
resetDistributionCache(
) → void -
resizeFunctionWorkers(
int count, WorkerFunction function, {Map? metadata}) → void -
resync(
) → void -
send(
dynamic data) → void -
stop(
) → Future -
toString(
) → String -
A string representation of this object.
inherited
-
waitFor(
) → Future -
workerAt(
int id) → WorkerSocket
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
int id) → WorkerSocket