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

TimeoutStrategy

public enum TimeoutStrategy
Defines how timeouts are enforced.

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

A 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.