<PackageReference Include="Polly" Version="5.3.0" />

TimeoutStrategy

public enum TimeoutStrategy
Defines strategies used by TimeoutPolicys to enforce timeouts.

An optimistic TimeoutStrategy. The TimeoutPolicy relies on a timing-out CancellationToken to cancel executed delegates by co-operative cancellation.

An pessimistic TimeoutStrategy. The TimeoutPolicy will assume the delegates passed to be executed will not necessarily honor any timing-out CancellationToken, but the policy will still guarantee timing out (and returning to the caller) by other means.