| ParallelStartT Method (FuncT, WorkOptions, Action) |
Creates and starts a task which executes the given function and stores the result for later
retrieval.
Namespace: DigitalRune.ThreadingAssembly: DigitalRune (in DigitalRune.dll) Version: 1.20.0.0 (1.20.1.14552)
Syntax public static Task<T> Start<T>(
Func<T> function,
WorkOptions options,
Action completionCallback
)
Public Shared Function Start(Of T) (
function As Func(Of T),
options As WorkOptions,
completionCallback As Action
) As Task(Of T)
public:
generic<typename T>
static Task<T> Start(
Func<T>^ function,
WorkOptions options,
Action^ completionCallback
)
static member Start :
function : Func<'T> *
options : WorkOptions *
completionCallback : Action -> Task<'T>
Parameters
- function
- Type: SystemFuncT
The function to execute in parallel. - options
- Type: DigitalRune.ThreadingWorkOptions
The work options to use with this action. - completionCallback
- Type: SystemAction
A method which will be called in RunCallbacks once this task has completed.
Type Parameters
- T
- The type of result the function returns.
Return Value
Type:
TaskTA
TaskT which stores the result of the function.
Exceptions Remarks Important: The completion callback is not executed automatically. Instead,
the callback is only executed when
RunCallbacks is called. See
RunCallbacks for additional information.
See Also