AsyncHelperDoOperationSynchronouslyTResult(FuncIAsyncContext, TResult, ParallelConfig) Method
Executes the specified
operation synchronously, in which some sub-operations may run in parallel.
See the
Examples section of the
AsyncHelper class for details.
Namespace: KGySoft.ThreadingAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.1.0
public static TResult DoOperationSynchronously<TResult>(
Func<IAsyncContext, TResult> operation,
ParallelConfig? configuration
)
Public Shared Function DoOperationSynchronously(Of TResult) (
operation As Func(Of IAsyncContext, TResult),
configuration As ParallelConfig
) As TResult
public:
generic<typename TResult>
static TResult DoOperationSynchronously(
Func<IAsyncContext^, TResult>^ operation,
ParallelConfig^ configuration
)
static member DoOperationSynchronously :
operation : Func<IAsyncContext, 'TResult> *
configuration : ParallelConfig -> 'TResult
- operation FuncIAsyncContext, TResult
- The operation to be executed.
- configuration ParallelConfig
- The configuration for the operation.
- TResult
- The type of the result of the specified operation.
TResultThe result of the
operation if the operation has not been canceled,
or the default value of
TResult if the operation has been canceled
and
ThrowIfCanceled in
configuration was set to
.