Dispatcher.

InvokeAsync(Func<Task>, DispatcherPriority) Method

Summary

Queues the specified work to run on the dispatcher thread and returns a proxy for the task returned by function.
Namespace
Avalonia.Threading
Containing Type
Dispatcher

Syntax

public Task InvokeAsync(Func<Task> function, DispatcherPriority priority = Normal)

Parameters

Name Type Description
function Func<Task> The work to execute asynchronously.
priority DispatcherPriority The priority with which to invoke the method.

Return Value

Type Description
Task A task that represents a proxy for the task returned by function.