CoreDispatcher.ShouldYield Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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. |
Queries whether the caller should yield if there are items in the task queue of higher priority than the current task.
public:
virtual bool ShouldYield() = ShouldYield;
/// [Windows.Foundation.Metadata.Overload("ShouldYield")]
bool ShouldYield();
[Windows.Foundation.Metadata.Overload("ShouldYield")]
public bool ShouldYield();
function shouldYield()
Public Function ShouldYield () As Boolean
Returns
bool
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 |
Queries whether the caller should yield if there are items in the task queue of the specified priority or higher.
public:
virtual bool ShouldYield(CoreDispatcherPriority priority) = ShouldYield;
/// [Windows.Foundation.Metadata.Overload("ShouldYieldToPriority")]
bool ShouldYield(CoreDispatcherPriority const& priority);
[Windows.Foundation.Metadata.Overload("ShouldYieldToPriority")]
public bool ShouldYield(CoreDispatcherPriority priority);
function shouldYield(priority)
Public Function ShouldYield (priority As CoreDispatcherPriority) As Boolean
Parameters
- priority
- CoreDispatcherPriority
The minimum priority level for which the current work item should yield.
Returns
bool
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 |