SpinWait.NextSpinWillYield Property

.NET Framework (current version)
 

Gets whether the next call to SpinOnce will yield the processor, triggering a forced context switch.

Namespace:   System.Threading
Assembly:  mscorlib (in mscorlib.dll)

public bool NextSpinWillYield { get; }

Property Value

Type: System.Boolean

Whether the next call to SpinOnce will yield the processor, triggering a forced context switch.

On a single-CPU machine, SpinOnce always yields the processor. On machines with multiple CPUs, SpinOnce may yield after an unspecified number of calls.

Universal Windows Platform
Available since 8
.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Windows Phone Silverlight
Available since 8.0
Windows Phone
Available since 8.1
Return to top
Show: