TaskExt.WaitWhile Method (Func(Boolean), CancellationToken)
Creates an awaitable task that blocks while a condition is true or the task is canceled.
Namespace: UltimateXR.Extensions.System.Threading
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0
Syntax
C#
public static Task WaitWhile(
Func<bool> condition,
CancellationToken ct = default
)
Parameters
- condition
- Type: System.Func(Boolean)
The condition that will perpetuate the block - ct (Optional)
- Type: System.Threading.CancellationToken
Optional cancellation token, to cancel the task
Return Value
See Also
Reference
TaskExt Class
WaitWhile Overload
UltimateXR.Extensions.System.Threading Namespace