SpinWait.SpinUntil SpinWait.SpinUntil SpinWait.SpinUntil SpinWait.SpinUntil Method

Definition

Spins until the specified condition is satisfied.

Overloads

SpinUntil(Func<Boolean>) SpinUntil(Func<Boolean>) SpinUntil(Func<Boolean>) SpinUntil(Func<Boolean>)

Spins until the specified condition is satisfied.

SpinUntil(Func<Boolean>, Int32) SpinUntil(Func<Boolean>, Int32) SpinUntil(Func<Boolean>, Int32) SpinUntil(Func<Boolean>, Int32)

Spins until the specified condition is satisfied or until the specified timeout is expired.

SpinUntil(Func<Boolean>, TimeSpan) SpinUntil(Func<Boolean>, TimeSpan) SpinUntil(Func<Boolean>, TimeSpan) SpinUntil(Func<Boolean>, TimeSpan)

Spins until the specified condition is satisfied or until the specified timeout is expired.

SpinUntil(Func<Boolean>) SpinUntil(Func<Boolean>) SpinUntil(Func<Boolean>) SpinUntil(Func<Boolean>)

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
condition
Func<Boolean>

A delegate to be executed over and over until it returns true.

Exceptions

SpinUntil(Func<Boolean>, Int32) SpinUntil(Func<Boolean>, Int32) SpinUntil(Func<Boolean>, Int32) SpinUntil(Func<Boolean>, Int32)

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
condition
Func<Boolean>

A delegate to be executed over and over until it returns true.

millisecondsTimeout
Int32 Int32 Int32 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

millisecondsTimeout is a negative number other than -1, which represents an infinite time-out.

SpinUntil(Func<Boolean>, TimeSpan) SpinUntil(Func<Boolean>, TimeSpan) SpinUntil(Func<Boolean>, TimeSpan) SpinUntil(Func<Boolean>, TimeSpan)

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
condition
Func<Boolean>

A delegate to be executed over and over until it returns true.

timeout
TimeSpan TimeSpan TimeSpan 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

timeout is a negative number other than -1 milliseconds, which represents an infinite time-out -or- timeout is greater than MaxValue.

Applies to