diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2021-02-06 16:26:59 -0600 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2021-02-06 17:29:29 -0600 |
| commit | d5c041befbb60e7bfce14af2eaf1e8c686524209 (patch) | |
| tree | 2f3ae57f64c807604de7605391c94cbbaac88ffe /src/engine/engine.cpp | |
| parent | c5b9c47a26ca4e9d4eea63b7219b4d34938a5f1a (diff) | |
| download | wix-d5c041befbb60e7bfce14af2eaf1e8c686524209.tar.gz wix-d5c041befbb60e7bfce14af2eaf1e8c686524209.tar.bz2 wix-d5c041befbb60e7bfce14af2eaf1e8c686524209.zip | |
Add ::Sleep(0) in engine loop to unblock PostThreadMessage
Diffstat (limited to 'src/engine/engine.cpp')
| -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 | } |
