Compartilhar via


JoinableTaskContextNode.OnHangDetected Method

Occurs when a hang involving the main thread is suspected to have occurred.

Namespace:  Microsoft.VisualStudio.Threading
Assembly:  Microsoft.VisualStudio.Threading (in Microsoft.VisualStudio.Threading.dll)

Syntax

'Declaration
Protected Friend Overridable Sub OnHangDetected ( _
    hangDuration As TimeSpan, _
    notificationCount As Integer, _
    hangId As Guid _
)
protected internal virtual void OnHangDetected(
    TimeSpan hangDuration,
    int notificationCount,
    Guid hangId
)
protected public:
virtual void OnHangDetected(
    TimeSpan hangDuration, 
    int notificationCount, 
    Guid hangId
)
abstract OnHangDetected : 
        hangDuration:TimeSpan * 
        notificationCount:int * 
        hangId:Guid -> unit  
override OnHangDetected : 
        hangDuration:TimeSpan * 
        notificationCount:int * 
        hangId:Guid -> unit
function OnHangDetected(
    hangDuration : TimeSpan, 
    notificationCount : int, 
    hangId : Guid
)

Parameters

  • notificationCount
    Type: System.Int32

    The number of times this hang has been reported, including this one.

  • hangId
    Type: System.Guid

    A random GUID that uniquely identifies this particular hang.

Remarks

A single hang occurrence may invoke this method multiple times, with increasing values in the hangDuration parameter.

.NET Framework Security

See Also

Reference

JoinableTaskContextNode Class

Microsoft.VisualStudio.Threading Namespace