.net message loop
Could anyone help to explain how can I interact with message loop in WPF?
I know how to start it using 

    System.Windows.Threading.Dispatcher.Run()
Now, I just need a way to call it.
I have a while-loop and I whant to process messages in a message loop from it.

    while (state == DebuggerStaus.Waiting)
                {
                    Thread.Sleep(10);
                    //>> Here I whant to call a message loop <<
                }
Waiting for your suggestions.
Best regards.
.net message loop
===

Could anyone help to explain how can I interact with message loop in WPF?
I know how to start it using 

    System.Windows.Threading.Dispatcher.Run()
Now, I just need a way to call it.
I have a while-loop and I whant to process messages in a message loop from it.

    while (state == DebuggerStaus.Waiting)
                {
                    Thread.Sleep(10);
                    //>> Here I whant to call a message loop <<
                }
Waiting for your suggestions.
Best regards.