JoinableTaskContext Class
A common context within which joinable tasks may be created and interact to avoid deadlocks.
Inheritance Hierarchy
System.Object
Microsoft.VisualStudio.Threading.JoinableTaskContext
Namespace: Microsoft.VisualStudio.Threading
Assembly: Microsoft.VisualStudio.Threading (in Microsoft.VisualStudio.Threading.dll)
Syntax
'Declaration
Public Class JoinableTaskContext _
Implements IHangReportContributor
public class JoinableTaskContext : IHangReportContributor
public ref class JoinableTaskContext : IHangReportContributor
type JoinableTaskContext =
class
interface IHangReportContributor
end
public class JoinableTaskContext implements IHangReportContributor
The JoinableTaskContext type exposes the following members.
Constructors
Name | Description | |
---|---|---|
JoinableTaskContext | Initializes a new instance of the JoinableTaskContext. |
Top
Properties
Name | Description | |
---|---|---|
Factory | Gets the factory which creates joinable tasks that do not belong to a joinable task collection. | |
IsWithinJoinableTask | Determines whether the caller is currently running in the context of a joinable task. | |
MainThread | Gets the main thread that can be shared by tasks created by this context. |
Top
Methods
Name | Description | |
---|---|---|
CreateCollection | Creates a collection for in-flight joinable tasks. | |
CreateDefaultFactory | Creates a factory without a JoinableTaskCollection. | |
CreateFactory | Creates a joinable task factory that automatically adds all created tasks to a collection that can be jointly joined. | |
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.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
IsMainThreadBlocked | Determines whether the main thread is blocked for the caller's completion. | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
OnHangDetected | Called when a hang is suspected to have occurred involving the main thread. | |
SuppressRelevance | Conceals any ticket to the Main thread until the returned value is disposed. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Explicit Interface Implementations
Name | Description | |
---|---|---|
IHangReportContributor.GetHangReport | Contributes data for a hang report. |
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.