TaskExt ClassTask extensions.
Inheritance Hierarchy
System.Object
UltimateXR.Extensions.System.Threading.TaskExt
Namespace: UltimateXR.Extensions.System.Threading
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0
Syntax
C#
public static class TaskExt
The TaskExt type exposes the following members.
Methods
Name | Description | |
---|---|---|
Delay(Int32, CancellationToken) | Creates an awaitable task that finishes after a given amount of milliseconds. | |
Delay(Single, CancellationToken) | Creates an awaitable task that finishes after a given amount of seconds. | |
FireAndForget | Allows to run a task in “fire and forget” mode, when it is not required to await nor is it relevant whether it succeeds or not. There still needs to be a way to handle exceptions to avoid unhandled exceptions and process termination. | |
Loop | Loops iterating once per frame during a specified amount of time, executing a user-defined action. | |
SkipFrames | Creates an awaitable task that finishes after a given amount of frames. | |
WaitForNextFrame | Creates an awaitable task that finishes the next frame. | |
WaitUntil(Func(Boolean), CancellationToken) | Creates an awaitable task that blocks until a condition is true or the task is canceled. | |
WaitUntil(Func(Boolean), Int32, CancellationToken) | Creates an awaitable task that blocks until a condition is true, a timeout occurs or the task is canceled. | |
WaitUntil(Func(Boolean), Single, Action, CancellationToken) | Creates an awaitable task that blocks until a condition is true, waiting a certain amount of seconds at maximum. An optional action can be called if the task was cancelled or it timed out. | |
WaitUntilCancelled | Provides a one-liner method to await until a task is cancelled. | |
WaitWhile(Func(Boolean), CancellationToken) | Creates an awaitable task that blocks while a condition is true or the task is canceled. | |
WaitWhile(Func(Boolean), Int32, CancellationToken) | Creates an awaitable task that blocks while a condition is true, a timeout occurs or the task is canceled. | |
WaitWhile(Func(Boolean), Single, Action, CancellationToken) | Creates an awaitable task that blocks while a condition is true, waiting a certain amount of seconds at maximum. An optional action can be called if the task was cancelled or it timed out. |