JoinableTask Class
Tracks asynchronous operations and allows you to join asynchronous operations to avoid deadlocks while synchronously blocking the Main thread until the completion of the operation.
Inheritance Hierarchy
System.Object
Microsoft.VisualStudio.Threading.JoinableTask
Microsoft.VisualStudio.Threading.JoinableTask<T>
Namespace: Microsoft.VisualStudio.Threading
Assembly: Microsoft.VisualStudio.Threading (in Microsoft.VisualStudio.Threading.dll)
Syntax
'Declaration
Public Class JoinableTask
public class JoinableTask
public ref class JoinableTask
type JoinableTask = class end
public class JoinableTask
The JoinableTask type exposes the following members.
Properties
Name | Description | |
---|---|---|
IsCompleted | Determines whether the asynchronous operation represented by this instance has completed. | |
Task | Gets the asynchronous task that completes when the asynchronous operation completes. |
Top
Methods
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetAwaiter | Gets an awaiter that is equivalent to calling JoinAsync. | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Join | Synchronously blocks the calling thread until the operation has completed. If the calling thread is the Main thread, deadlocks are mitigated. | |
JoinAsync | Joins any main thread affinity of the caller with the asynchronous operation. This is to avoid deadlocks in case the main thread ultimately synchronously blocks while it is waiting for the operation to complete. | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.