CoreDispatcher.ShouldYield Method

Definition

Overloads

ShouldYield()

Queries whether the caller should yield if there are items in the task queue of higher priority than the current task.

ShouldYield(CoreDispatcherPriority)

Queries whether the caller should yield if there are items in the task queue of the specified priority or higher.

ShouldYield()

Queries whether the caller should yield if there are items in the task queue of higher priority than the current task.

C#
[Windows.Foundation.Metadata.Overload("ShouldYield")]
public bool ShouldYield();

Returns

Boolean

true if the current work item should yield to higher priority work; false if it should not.

Attributes

See also

Applies to

WinRT Build 26100 and other versions
Product Versions
WinRT Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100

ShouldYield(CoreDispatcherPriority)

Queries whether the caller should yield if there are items in the task queue of the specified priority or higher.

C#
[Windows.Foundation.Metadata.Overload("ShouldYieldToPriority")]
public bool ShouldYield(CoreDispatcherPriority priority);

Parameters

priority
CoreDispatcherPriority

The minimum priority level for which the current work item should yield.

Returns

Boolean

true if the current work item should yield to higher priority work; false if it should not.

Attributes

See also

Applies to

WinRT Build 26100 and other versions
Product Versions
WinRT Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100