IsolateTask<T, R> class
A task wrapper for isolate execution.
Encapsulates the callback function, input data, and completion handling for executing work in an isolate.
Constructors
-
IsolateTask({required FutureOr<
R> callback(T message), required T message, required Completer<R> completer})
Properties
- callback → Function
-
The callback function to execute in the isolate
The callback function to execute in the isolate
final
-
completer
→ Completer<
R> -
Completer to signal task completion
final
- createdAt → DateTime
-
Timestamp when the task was created
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isCancelled → bool
-
Whether this task has been cancelled
no setter
- isCompleted → bool
-
Whether this task has been completed
no setter
- message → T
-
The input data to pass to the callback
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
cancel(
) → void - Cancel the task
-
complete(
R result) → void - Complete the task with a result
-
completeError(
Object error, [StackTrace? stackTrace]) → void - Complete the task with an error
-
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