Debugger.NotifyOfCrossThreadDependency Method (System.Diagnostics)

Switch View :
ScriptFree
.NET Framework Class Library
Debugger.NotifyOfCrossThreadDependency Method

Notifies a debugger that execution is about to enter a path that involves a cross-thread dependency.

Namespace:  System.Diagnostics
Assembly:  mscorlib (in mscorlib.dll)
Syntax

Visual Basic
<ComVisibleAttribute(False)> _
Public Shared Sub NotifyOfCrossThreadDependency
C#
[ComVisibleAttribute(false)]
public static void NotifyOfCrossThreadDependency()
Visual C++
[ComVisibleAttribute(false)]
public:
static void NotifyOfCrossThreadDependency()
F#
[<ComVisibleAttribute(false)>]
static member NotifyOfCrossThreadDependency : unit -> unit 

Remarks

Debuggers must specifically enable callbacks that they wish to receive. A debugger that wants to receive cross-thread dependency callbacks must call the ICorDebugProcess3::SetEnableCustomNotification method.

A debugger that has selected NotifyOfCrossThreadDependency can take appropriate action upon notification. For example, performing a function evaluation typically requires freezing all threads except for the thread that is performing the evaluation. If the function evaluation requires execution on more than one thread, as might occur in remoting scenarios, the evaluation will block. The NotifyOfCrossThreadDependency notification informs the debugger that it has to release a thread or abort the function evaluation. The notification is subject to collection after this method returns.

Version Information

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4
Platforms

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
See Also

Reference