WASIComponentTask class final
Callee-side state for Component Model task.* canonical operations.
Constructors
- WASIComponentTask({String name = 'task', WASIComponentSubtask? subtask, void onCancellationRequested(WASIComponentTask task)?})
-
Creates a task optionally linked to its caller-side
subtask.
Properties
- borrowCount → int
-
Number of outstanding borrows lent to this task.
no setter
- cancellationRequested → bool
-
Whether the caller requested cancellation.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasResult → bool
-
Whether
task.returnstored a result value.no setter - name → String
-
Debug label used in diagnostics.
no setter
- result → Object?
-
Result value stored by
task.return.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state → WASIComponentTaskState
-
Current task state.
no setter
Methods
-
addBorrow(
) → void - Records a borrow lent to this task.
-
cancel(
) → void -
Executes
task.cancel. -
markStarted(
) → void - Marks the task as started and publishes caller-side subtask progress.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
releaseBorrow(
) → void - Releases a borrow lent to this task.
-
requestCancellation(
) → void - Requests cooperative cancellation of this task.
-
returnResult(
{Object? result, bool hasResult = false}) → void -
Executes
task.return. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited