Synced
OwnerThreadExecution.Run
Section titled “OwnerThreadExecution.Run”
- Pumps continuations until the owned operation completes, then restores the previous context.
Required contracts
Section titled “Required contracts”API: engine
Project: Inno.Core.Execution
Declaration
Section titled “Declaration”public static TResult Inno.Core.Execution.OwnerThreadExecution.Run<TResult>(System.Func<System.Threading.Tasks.Task<TResult>> operation)Type parameters
Section titled “Type parameters”Type parameter TResult: The result produced by the operation.
Parameters
Section titled “Parameters”Parameter operation: Work that owns and retires every task it starts before returning. Async void work is not supported.
Returns
Section titled “Returns”The completed operation result. Operation failures and cancellation propagate unchanged.
Exceptions
Section titled “Exceptions”Exception T:System.ArgumentNullException: The operation is null.
Exception T:System.InvalidOperationException: The operation returned a null task.
Remarks
Section titled “Remarks”This is a blocking host boundary. Callback-driven hosts use their platform synchronization context instead. Work that explicitly suppresses context capture is responsible for returning to the owner before accessing thread-affine resources.