Constructors

WorkerPool(List<WorkerSocket> sockets)

Properties

onMessageReceivedHandler → Function

read / write
sessions → Stream<WorkerSession>

read-only
sockets → List<WorkerSocket>

final
hashCode → int

The hash code for this object.

read-only, inherited
runtimeType → Type

A representation of the runtime type of the object.

read-only, inherited

Operators

operator [](int id) WorkerSocket

operator ==(other) → bool

The equality operator.

inherited

Methods

addMethod(String name, Taker handler) → void

callMethod(String name, [ argument ]) → Future<List>

createSession([initialMessage ]) → Future<WorkerSession>

distribute(String name, [ 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, event)) → void

ping() → Future

reduceWorkers(int count) → Future

resetDistributionCache() → void

resizeFunctionWorkers(int count, WorkerFunction function, { Map<String, dynamic> metadata }) → Future

resync() → void

send(data) → void

stop() → Future

waitFor() → Future

workerAt(int id) WorkerSocket

noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited
toString() → String

Returns a string representation of this object.

inherited