JSSynchronizationContext.RunAsync method (1 of 2)
Runs an action on the JS thread, and asynchronously waits for completion.
C#
public Task RunAsync(Func<Task> asyncAction)
parameter | description |
---|---|
asyncAction | The action to run. |
See Also
- class JSSynchronizationContext
- namespace Microsoft.JavaScript.NodeApi.Interop
JSSynchronizationContext.RunAsync<T> method (2 of 2)
Runs an action on the JS thread, and asynchronously waits for the return value.
C#
public Task<T> RunAsync<T>(Func<Task<T>> asyncAction)
parameter | description |
---|---|
asyncAction | The action to run. |
See Also
- class JSSynchronizationContext
- namespace Microsoft.JavaScript.NodeApi.Interop