Interface IAsyncPolicy<T>
- Namespace
- DotCompute.Backends.Metal.Utilities
- Assembly
- DotCompute.Backends.Metal.dll
Simple retry policy interface for Metal operations with return value.
public interface IAsyncPolicy<T>
Type Parameters
TThe return type.
Methods
ExecuteAsync(Func<Task<T>>, CancellationToken)
Executes a function with retry logic.
Task<T> ExecuteAsync(Func<Task<T>> operation, CancellationToken cancellationToken = default)
Parameters
operationFunc<Task<T>>The operation to execute.
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<T>
A task representing the operation with a return value.