SpinWait.SpinUntil Method
Definition
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.
Spins until the specified condition is satisfied.
Overloads
SpinUntil(Func<Boolean>) |
Spins until the specified condition is satisfied. |
SpinUntil(Func<Boolean>, Int32) |
Spins until the specified condition is satisfied or until the specified timeout is expired. |
SpinUntil(Func<Boolean>, TimeSpan) |
Spins until the specified condition is satisfied or until the specified timeout is expired. |
SpinUntil(Func<Boolean>)
- Source:
- SpinWait.cs
- Source:
- SpinWait.cs
- Source:
- SpinWait.cs
Spins until the specified condition is satisfied.
public:
static void SpinUntil(Func<bool> ^ condition);
public static void SpinUntil (Func<bool> condition);
static member SpinUntil : Func<bool> -> unit
Public Shared Sub SpinUntil (condition As Func(Of Boolean))
Parameters
Exceptions
The condition
argument is null.
See also
Applies to
SpinUntil(Func<Boolean>, Int32)
- Source:
- SpinWait.cs
- Source:
- SpinWait.cs
- Source:
- SpinWait.cs
Spins until the specified condition is satisfied or until the specified timeout is expired.
public:
static bool SpinUntil(Func<bool> ^ condition, int millisecondsTimeout);
public static bool SpinUntil (Func<bool> condition, int millisecondsTimeout);
static member SpinUntil : Func<bool> * int -> bool
Public Shared Function SpinUntil (condition As Func(Of Boolean), millisecondsTimeout As Integer) As Boolean
Parameters
- millisecondsTimeout
- Int32
The number of milliseconds to wait, or Infinite (-1) to wait indefinitely.
Returns
true
if the condition is satisfied within the timeout; otherwise, false.
Exceptions
The condition
argument is null.
millisecondsTimeout
is a negative number other than -1, which represents an infinite time-out.
See also
Applies to
SpinUntil(Func<Boolean>, TimeSpan)
- Source:
- SpinWait.cs
- Source:
- SpinWait.cs
- Source:
- SpinWait.cs
Spins until the specified condition is satisfied or until the specified timeout is expired.
public:
static bool SpinUntil(Func<bool> ^ condition, TimeSpan timeout);
public static bool SpinUntil (Func<bool> condition, TimeSpan timeout);
static member SpinUntil : Func<bool> * TimeSpan -> bool
Public Shared Function SpinUntil (condition As Func(Of Boolean), timeout As TimeSpan) As Boolean
Parameters
- timeout
- TimeSpan
A TimeSpan that represents the number of milliseconds to wait, or a TimeSpan that represents -1 milliseconds to wait indefinitely.
Returns
true
if the condition is satisfied within the timeout; otherwise, false.
Exceptions
The condition
argument is null.
timeout
is a negative number other than -1 milliseconds, which represents an infinite time-out -or- timeout is greater than Int32.MaxValue.