Language

TaskRun<TOutput> Class

Definition

A handle to a started task run. Await Completion to observe the typed result; to cancel only your wait (without affecting the durable run) use Completion.WaitAsync(cancellationToken). The protected constructor supports mocking; the engine returns populated instances.

public class TaskRun<TOutput>
type TaskRun<'Output> = class
Public Class TaskRun(Of TOutput)

Type Parameters

TOutput

The task output type.

Inheritance
TaskRun<TOutput>

Constructors

Name Description
TaskRun<TOutput>()

Initializes a new instance of the TaskRun<TOutput> class for mocking.

Properties

Name Description
Completion

A task that completes with the run's typed result. Await it to observe the result; use Completion.WaitAsync(cancellationToken) to cancel only your wait. If the run is deferred for recovery, this task remains pending — the durable run resumes elsewhere.

InputId

The input id assigned to the input that started this run.

IsQueued

Whether the input was queued as steering rather than starting a fresh run.

Stream

The event stream associated with the input that started this run.

TaskId

The task id.

Methods

Name Description
RequestCancellationAsync()

Requests cooperative cancellation of this input, including after a queued input is promoted. A completed or retired input is cancellation-inert; this never cancels a successor input.

Applies to