DoxIsolate class
- Inheritance
-
- Object
- IsolateSpawner
- DoxIsolate
Constructors
- DoxIsolate()
-
factory
Properties
- firstStart ↔ bool
-
True while spawn waits for the first start of the isolates. An
isolate that ends then is not started again: spawn fails.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
isolates
→ Map<
int, Isolate> -
the running isolates, isolate id -> isolate
finalinherited
- maxEarlyExits → int?
-
How many times in a row an isolate may end before it serves, until
it is not started again. Null: no limit.
no setterinherited
-
ready
→ Map<
int, Completer< bool> > -
isolate id -> true when it serves, false when it ended before that
finalinherited
-
receivePorts
→ Map<
int, List< ReceivePort> > -
finalinherited
- restartDelay ↔ Duration
-
wait before a dead isolate is started again,
so a crash loop does not burn the CPU
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
sendPorts
→ Map<
int, SendPort> -
isolate id -> the port to send the stop message to
finalinherited
- server ↔ ServerAdapter?
-
the server of
startServer(server:), sent to each isolategetter/setter pair - stopped ↔ bool
-
getter/setter pairinherited
Methods
-
killAll(
{bool now = false}) → void -
kill all the isolate. With
nowthey stop at once, not at their next event.inherited -
killIsolates(
{bool now = false}) → void -
killAll for the isolates and their ports only. The counter, the
session store and the bus of this isolate stay as they are.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
spawn(
int count) → Future< void> -
create threads
override
-
spawnOne(
int isolateId) → Future< void> -
create a thread.
when it dies, the error is printed and the isolate is started again.
the main isolate (id 1) is not watched here: if it dies the process
exits with a non-zero code, and your supervisor (docker, systemd)
restarts it.
inherited
-
start(
int isolateId, SendPort control, SendPort error, SendPort exit, List< ReceivePort> ports) → Future<Isolate> -
Start the isolate
isolateId. It sends its stop port tocontrol, its errors toerrorand tellsexitwhen it ends.portsare closed when the isolate ends.override -
stopAll(
Duration timeout) → Future< void> -
Stop every isolate gracefully: each stops taking connections, lets
open requests finish (up to
timeout) and runsshutdown()of its providers. Isolates still busy after that are killed.inherited -
stopServing(
Duration timeout) → Future< void> -
The first part of stopAll: every isolate that serves stops
gracefully. The isolates are not killed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited