LimitedConcurrencyLevelTaskScheduler.TryExecuteTaskInline Method

Determines whether the provided Task can be executed synchronously in this call, and if it can, executes it.
Protected NotOverridable Overrides Function TryExecuteTaskInline( _ 
ByVal task As Task, _ 
ByVal taskWasPreviouslyQueued As Boolean
) As Boolean
This language is not supported or no code example is available.
protected sealed override bool TryExecuteTaskInline( 
Task task
bool taskWasPreviouslyQueued 
)
This language is not supported or no code example is available.
protected:  
bool TryExecuteTaskInline( 
Task^ task
bool taskWasPreviouslyQueued 
) sealed
This language is not supported or no code example is available.
protected final function TryExecuteTaskInline( 
task : Task
taskWasPreviouslyQueued : boolean 
) : boolean;
This language is not supported or no code example is available.

Parameters

task
Task

The Task to be executed.

taskWasPreviouslyQueued
bool

A Boolean denoting whether or not task has previously been queued. If this parameter is True, then the task may have been previously queued (scheduled); if False, then the task is known not to have been queued, and this call is being made in order to execute the task inline without queuing it.

Return Value

bool

A Boolean value indicating whether the task was executed inline.

Exception type Condition

ArgumentNullException

The task argument is null.

InvalidOperationException

The task was already executed.

.NET Framework

Supported in: 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1

In this article

Definition