vcl/source/app/scheduler.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit e89c4d157a66e273898a8851d25fd0504cb28fc6
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Tue Mar 26 19:06:25 2024 +0500
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Tue Mar 26 19:08:05 2024 +0100

    Set the condition, even when main thread message queue is empty
    
    Post an empty user event for that.
    
    Change-Id: I9ab4b4374a25eddce8c58d36f58e08bec4a1855c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165352
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index 4f2543641c3c..e9f4057cd47c 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -284,6 +284,9 @@ Scheduler::IdlesLockGuard::IdlesLockGuard()
         // condition to proceed. Only main thread returning to 
Application::Execute guarantees that
         // the flag really took effect.
         pSVData->m_inExecuteCondtion.reset();
+        // Put an empty event to the application's queue, to make sure that it 
loops through the
+        // code that sets the condition, even when there's no other events in 
the queue
+        Application::PostUserEvent({});
         SolarMutexReleaser releaser;
         pSVData->m_inExecuteCondtion.wait();
     }

Reply via email to