<PackageReference Include="Polly.Core" Version="8.0.0-alpha.1" />

TaskExecution<T>

sealed class TaskExecution<T>
Represents a single hedging attempt execution alongside all the necessary resources. These are: Distinct ResilienceContext instance for this execution. One exception are primary task where the main context is reused. The cancellation token associated with the execution.
public ResilienceContext Context { get; }

public Task ExecutionTaskSafe { get; }

Gets the task that represents the execution of the hedged task.

public bool IsAccepted { get; }

public bool IsHandled { get; }

public Action<TaskExecution<T>> OnReset { get; set; }

public Outcome<object> Outcome { get; }

public HedgedTaskType Type { get; set; }

public TaskExecution(HedgingHandler<T> handler, CancellationTokenSourcePool cancellationTokenSourcePool)

public void AcceptOutcome()

public void Cancel()

public ValueTask<bool> InitializeAsync<TResult, TState>(HedgedTaskType type, ContextSnapshot snapshot, Func<ResilienceContext, TState, ValueTask<Outcome<TResult>>> primaryCallback, TState state, int attempt)