UtilFormsForceMessageQueuePump Method
This method allows the current thread to perform long-running operations
while continuing to perform standard COM and SendMessage pumping.
Calling this method during a long-running operation will prevent the
Managed Debugging Assistant (MDA) 'ContextSwitchDeadlock' error to occur while debugging your solution.
This error may occur when the thread that owns the destination context/apartment is
processing a very long-running operation without pumping Windows messages for a specific period of time.
For example, you will use this method while performing a long-running operation with COM objects (eg. inside a "infinite" loop)
that is blocking the UI thread,
so it is unabling the UI thread to pump window messages as they arrive,
causing the 'ContextSwitchDeadlock' error to occur in the Visual Studio debugger after 60 seconds.
Namespace: DevCase.Core.Application.FormsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static void ForceMessageQueuePump()
Public Shared Sub ForceMessageQueuePump
UtilForms.ForceMessageQueuePump()
public:
static void ForceMessageQueuePump()
static member ForceMessageQueuePump : unit -> unit
No code example is currently available or this language may not be supported.
This is a code example.
No code example is currently available or this language may not be supported.
Do While True
' Intensive work here...
ForceMessageQueuePump()
Loop
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.