TaskExt.FireAndForget Method

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.

Namespace: UltimateXR.Extensions.System.Threading
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0

Syntax

C#

public static void FireAndForget(
	this Task self
)


Parameters

 

self
Type: System.Threading.Tasks.Task
Task to run in fire and forget mode

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Task. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Exceptions

ExceptionCondition
ArgumentNullExceptionThe task is null

See Also

Reference

TaskExt Class
UltimateXR.Extensions.System.Threading Namespace