Bagikan melalui


JoinableTaskFactory.RunAsync Method

Include Protected Members
Include Inherited Members

Wraps the invocation of an asynchronous method so that it may execute asynchronously, but may potentially be synchronously completed (waited on) in the future.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

Overload List

  Name Description
Public method RunAsync<T>(Func<Task<T>>) Wraps the invocation of an asynchronous method so that it may execute asynchronously, but may potentially be synchronously completed (waited on) in the future.
Public method RunAsync(Func<Task>) Wraps the invocation of an asynchronous method so that it may execute asynchronously, but may potentially be synchronously completed (waited on) in the future.

Top

Remarks

See the Run overload documentation for an example

See Also

Reference

JoinableTaskFactory Class

Microsoft.VisualStudio.Threading Namespace