Table of Contents

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

T

The 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

operation Func<Task<T>>

The operation to execute.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<T>

A task representing the operation with a return value.