TaskExecutionControl class

Runtime callbacks and optional services exposed to an executing task.

Constructors

TaskExecutionControl({void heartbeat() = _noopHeartbeat, Future<void> extendLease(Duration by) = _noopExtendLease, Future<void> progress(double percentComplete, {Map<String, Object?>? data}) = _noopProgress, TaskCancellationToken cancellation = const TaskCancellationToken.none(), TaskEnqueuer? enqueuer, WorkflowCaller? workflows, WorkflowEventEmitter? workflowEvents})
Creates execution controls for the current delivery runtime.
const

Properties

cancellation TaskCancellationToken
Cooperative cancellation state supplied by the host.
final
enqueuer TaskEnqueuer?
Optional producer used for child task dispatch.
final
extendLease Future<void> Function(Duration by)
Requests additional delivery time from the host.
final
hashCode int
The hash code for this object.
no setterinherited
heartbeat → void Function()
Notifies the host that execution remains active.
final
progress Future<void> Function(double percentComplete, {Map<String, Object?>? data})
Reports task progress to the host.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
workflowEvents WorkflowEventEmitter?
Optional workflow event emitter.
final
workflows WorkflowCaller?
Optional workflow caller used for child workflows.
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