IsolateBundle<TConfig extends IsolateBundleConfiguration, TSend, TReceive> class
Wraps an isolate together with an id, config and channels to send and receive messages between them.
Sending messages can be done with the send property. All messages which come from the isolate are streamed in the messages property.
To release all resources of an instance the cancel method should be called.
Constructors
-
IsolateBundle({required String id, required Isolate isolate, required TConfig config, required void send(TSend message), required Stream<
TReceive> messages, required Future<void> cancel(CancelMessage cancelMessage)}) - Wraps an isolate together with an id, config and channels to send and receive messages between them.
Properties
-
cancel
→ Future<
void> Function(CancelMessage cancelMessage) -
Cancels the isolate bundle.
final
- config → TConfig
-
The configuration which was used to initialize the isolate.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
The id/name of the isolate.
final
- isolate → Isolate
-
The isolate with which this bundle communicates.
final
-
messages
→ Stream<
TReceive> -
Streams the messages which are received from the isolate.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- send → void Function(TSend message)
-
Sends a message to the isolate.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited