ParallelWorkBrokerQueueWorkT Method (FuncT, DispatchQueueType, CancellationToken, TaskCreationOptions, FuncTaskT, T) |
Queues the work specified in the form of the func workToQueueFunc, on the queue specified.
Namespace:
SD.LLBLGen.Pro.ApplicationCore.Parallelization
Assembly:
SD.LLBLGen.Pro.ApplicationCore (in SD.LLBLGen.Pro.ApplicationCore.dll) Version: 5.10.0.0 (5.10.0)
Syntax public Task<T> QueueWork<T>(
Func<T> workToQueueFunc,
DispatchQueueType queueToUse,
CancellationToken cancellationToken,
TaskCreationOptions options,
Func<Task<T>, T> continuationFunc
)
Public Function QueueWork(Of T) (
workToQueueFunc As Func(Of T),
queueToUse As DispatchQueueType,
cancellationToken As CancellationToken,
options As TaskCreationOptions,
continuationFunc As Func(Of Task(Of T), T)
) As Task(Of T)
Parameters
- workToQueueFunc
- Type: SystemFuncT
The work. - queueToUse
- Type: SD.LLBLGen.Pro.ApplicationCoreDispatchQueueType
The queue to use. - cancellationToken
- Type: System.ThreadingCancellationToken
The cancellation token. - options
- Type: System.Threading.TasksTaskCreationOptions
The task creation options for the task to be created by this method. - continuationFunc
- Type: SystemFuncTaskT, T
The continuation function to pass to ContinueWith on the created task if not null. If null, no continuation is created.
Type Parameters
- T
- The type of the result of the work queue func and the continuation func
Return Value
Type:
TaskT
The task created which is dispatched on the queue specified
Exceptions See Also