Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/Polly.Core/ResilienceStrategy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@ public abstract partial class ResilienceStrategy
/// <param name="context">The context associated with the callback.</param>
/// <param name="state">The state associated with the callback.</param>
/// <returns>
/// An instance of pending <see cref="ValueTask"/> for asynchronous executions or completed <see cref="ValueTask"/> task for synchronous exexutions.
/// An instance of pending <see cref="ValueTask"/> for asynchronous executions or completed <see cref="ValueTask"/> task for synchronous executions.
/// </returns>
/// <remarks>
/// <strong>This method is called for both synchronous and asynchronous execution flows.</strong>
/// <para>
/// You can use <see cref="ResilienceContext.IsSynchronous"/> to dermine wheether the <paramref name="callback"/> is synchronous or asynchronous one.
/// You can use <see cref="ResilienceContext.IsSynchronous"/> to determine whether the <paramref name="callback"/> is synchronous or asynchronous one.
/// This is useful when the custom strategy behaves differently in each execution flow. In general, for most strategies, the implementation
/// is the same for both execution flows.
/// See <seealso href="https://github.com/App-vNext/Polly/blob/main/src/Polly.Core/README.md#about-synchronous-and-asynchronous-executions"/> for more details.
/// </para>
/// <para>
/// The provided callback never throws an exception. Instead, the exception is captured and converted to an <see cref="Outcome{TResult}"/>.
Expand Down
1 change: 1 addition & 0 deletions src/Polly.Core/ResilienceStrategyT.Async.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public ValueTask<TResult> ExecuteAsync<TResult, TState>(
public ValueTask<TResult> ExecuteAsync<TResult>(
Func<CancellationToken, ValueTask<TResult>> callback,
CancellationToken cancellationToken = default)
where TResult : T
{
Guard.NotNull(callback);

Expand Down