JoinableTaskFactory::RunAsync<T> Method (Func<Task<T>^>^)
Visual Studio 2015
Wraps the invocation of an asynchronous method so that it may execute asynchronously, but may potentially be synchronously completed (waited on) in the future.
Assembly: Microsoft.VisualStudio.Threading (in Microsoft.VisualStudio.Threading.dll)
Parameters
- asyncMethod
-
Type:
System::Func<Task<T>^>^
The asynchronous operation.
Return Value
Type: Microsoft.VisualStudio.Threading::JoinableTask<T>^An object that tracks the completion of the asynchronous operation, and allows for later synchronous blocking of the main thread for completion if necessary.
Type Parameters
- T
The type of value returned by the asynchronous operation.
Exceptions thrown by the delegate are captured by the returned JoinableTask.
Show: