AsyncHelperDoOperationSynchronouslyTResult(FuncIAsyncContext, TResult, 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: 9.0.0
public static TResult DoOperationSynchronously<TResult>(
Func<IAsyncContext, TResult> operation,
TResult canceledResult,
ParallelConfig? configuration
)
Public Shared Function DoOperationSynchronously(Of TResult) (
operation As Func(Of IAsyncContext, TResult),
canceledResult As TResult,
configuration As ParallelConfig
) As TResult
public:
generic<typename TResult>
static TResult DoOperationSynchronously(
Func<IAsyncContext^, TResult>^ operation,
TResult canceledResult,
ParallelConfig^ configuration
)
static member DoOperationSynchronously :
operation : Func<IAsyncContext, 'TResult> *
canceledResult : 'TResult *
configuration : ParallelConfig -> 'TResult
- operation FuncIAsyncContext, TResult
- The operation to be executed.
- canceledResult TResult
- The result to be returned if the operation has been canceled
and ThrowIfCanceled of configuration returns .
- 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
canceledResult if the operation has been canceled
and
ThrowIfCanceled in
configuration was set to
.