diff options
-rw-r--r-- | src/engine/engine.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/engine/engine.cpp b/src/engine/engine.cpp index bc27cb14..98c98661 100644 --- a/src/engine/engine.cpp +++ b/src/engine/engine.cpp | |||
@@ -776,6 +776,12 @@ static HRESULT RunApplication( | |||
776 | } | 776 | } |
777 | else | 777 | else |
778 | { | 778 | { |
779 | // When the BA makes a request from its own thread, it's common for the PostThreadMessage in externalengine.cpp | ||
780 | // to block until this thread waits on something. It's also common for Detect and Plan to never wait on something. | ||
781 | // In the extreme case, the engine could be elevating in Apply before the Detect call returned to the BA. | ||
782 | // This helps to avoid that situation, which could be blocking a UI thread. | ||
783 | ::Sleep(0); | ||
784 | |||
779 | ProcessMessage(pEngineState, &msg); | 785 | ProcessMessage(pEngineState, &msg); |
780 | } | 786 | } |
781 | } | 787 | } |