RunnerBuilder class
Allows for setting parameters used to initialize IsolateRunner and their worker instances
Constructors
Properties
- autoCloseChildren ↔ bool
-
Whether to automatically close the underlying isolates then the calling isolate is destroyed. Default is true. If you
set this to false, you must call Runner.close on your own.
getter/setter pair
- debugName ↔ String?
-
Returns the next debugName for an IsolateRunner based on these settings. If a LoadBalancer is used, a number
will be appended and incremented
getter/setter pair
- debugNameBase → String?
-
The base name for spawned isolates. If a LoadBalancer is used, then a number
will be appended to this base value. see RunnerBuilder.debugName
no setter
- defaultTimeout ↔ Duration?
-
The default timeout for commands sent to the IsolateRunner
getter/setter pair
- failOnError ↔ bool
-
Whether this isolate or pool should fail when an error is encountered.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
-
isolateInitializers
→ List<
InitializerWithParam> -
final
-
onIsolateCreated
→ List<
IsolateInitializer> -
final
- poolSize ↔ int
-
How many isolates to create in the pool. If this value is 1, then a single IsolateRunner will be created. Otherwise,
a LoadBalancer will be created. Must be greater than 0
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addIsolateInitializer(
FutureOr init()) → void - Adds an initializer - this is run on each isolate that's spawned, and contains any common setup.
-
addIsolateInitializerWithDeferredParam<
P> (RunInsideIsolateInitializer< P> init, P param()) → void - Adds an initializer - this is run on each isolate that's spawned, and contains any common setup. The parameter passed to the isolate must be a valid isolate message, but can be deferred until the time of isolate creation.
-
addIsolateInitializerWithParam<
P> (RunInsideIsolateInitializer< P> init, P param) → void - Adds an initializer - this is run on each isolate that's spawned, and contains any common setup.
-
addOnIsolateCreated(
IsolateInitializer init) → void - Adds an initializer - this consumes the IsolateRunner and performs some action on it.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
withoutTimeout(
) → void - Removes any timeouts for IsolateRunner instances created from this builder
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited