UxrMonoDispatcher.RunOnMainThreadAsync Method

Runs code on the main thread, asynchronously.

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

Syntax

C#

public static Task RunOnMainThreadAsync(
	CancellationToken ct,
	Action action
)

Parameters

 

ct
Type: System.Threading.CancellationToken
Cancellation token that allows to cancel the task.
action
Type: System.Action
The action to execute.

Return Value

Type: Task
An awaitable Task that finishes when the operation finished.

Exceptions

ExceptionCondition
ExceptionA delegate callback throws an exception.

See Also

Reference

UxrMonoDispatcher Class
UltimateXR.Core.Threading Namespace