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

NameDescription
Public methodStatic memberDelay(Int32, CancellationToken) Creates an awaitable task that finishes after a given amount of milliseconds.
Public methodStatic memberDelay(Single, CancellationToken) Creates an awaitable task that finishes after a given amount of seconds.
Public methodStatic memberFireAndForget 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.
Public methodStatic memberLoop Loops iterating once per frame during a specified amount of time, executing a user-defined action.
Public methodStatic memberSkipFrames Creates an awaitable task that finishes after a given amount of frames.
Public methodStatic memberWaitForNextFrame Creates an awaitable task that finishes the next frame.
Public methodStatic memberWaitUntil(Func(Boolean), CancellationToken) Creates an awaitable task that blocks until a condition is true or the task is canceled.
Public methodStatic memberWaitUntil(Func(Boolean), Int32, CancellationToken) Creates an awaitable task that blocks until a condition is true, a timeout occurs or the task is canceled.
Public methodStatic memberWaitUntil(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.
Public methodStatic memberWaitUntilCancelled Provides a one-liner method to await until a task is cancelled.
Public methodStatic memberWaitWhile(Func(Boolean), CancellationToken) Creates an awaitable task that blocks while a condition is true or the task is canceled.
Public methodStatic memberWaitWhile(Func(Boolean), Int32, CancellationToken) Creates an awaitable task that blocks while a condition is true, a timeout occurs or the task is canceled.
Public methodStatic memberWaitWhile(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.

See Also

Reference

UltimateXR.Extensions.System.Threading Namespace