JoinableTaskFactory Methods

Include Protected Members
Include Inherited Members

The JoinableTaskFactory type exposes the following members.

Methods

  Name Description
Protected method Add Adds the specified joinable task to the applicable collection.
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method OnTransitionedToMainThread Occurs whenever a joinable task has completed a transition to the main thread.
Protected method OnTransitioningToMainThread Occurs when a joinable task has requested a transition to the main thread.
Protected method PostToUnderlyingSynchronizationContext Posts a callback to the main thread via the underlying dispatcher, or to the threadpool when no dispatcher exists on the main thread.
Public method Run(Func<Task>) Runs the specified asynchronous method.
Public method Run<T>(Func<Task<T>>) Runs the specified asynchronous method.
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.
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 SwitchToMainThreadAsync Gets an awaitable whose continuations execute on the synchronization context with which this instance was initialized, so that both deadlocks and reentrancy are mitigated.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Protected method WaitSynchronously Synchronously blocks the calling thread for the completion of the specified task. If running on the main thread, any applicable message pump is suppressed while the thread sleeps.
Protected method WaitSynchronouslyCore Synchronously blocks the calling thread for the completion of the specified task.

Top

See Also

Reference

JoinableTaskFactory Class

Microsoft.VisualStudio.Threading Namespace