Synced
LifetimeScope.RunAsync
Section titled “LifetimeScope.RunAsync”
- Atomically admits and tracks asynchronous work under this owner’s cancellation boundary.
Required contracts
Section titled “Required contracts”API: engine
Project: Inno.Core.Execution
Declaration
Section titled “Declaration”public System.Threading.Tasks.Task<TResult> Inno.Core.Execution.LifetimeScope.RunAsync<TResult>(System.Func<System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<TResult>> operation, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))Type parameters
Section titled “Type parameters”Type parameter TResult: The operation result type.
Parameters
Section titled “Parameters”Parameter operation: The operation, which must observe the supplied token and must not require owner-thread completion.
Parameter cancellationToken: Additional cancellation requested by the caller.
Returns
Section titled “Returns”The tracked result, cancellation or operation failure.
Exceptions
Section titled “Exceptions”Exception T:System.InvalidOperationException: Retirement has begun or work capacity is exhausted; the operation is not invoked.