vcl/osx/salinst.cxx |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit 633be9b03c870d9f242279e7f8617ae6daaef460
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Mon Jun 26 16:03:26 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Jun 26 20:56:48 2023 +0200

    attempted fix for sporadic hang on macos
    
    Change-Id: I75d624eb98a87cb15f41be02631205cb86d7d270
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153618
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx
index f2ba3b59fb25..446bb32ae910 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -588,6 +588,7 @@ bool AquaSalInstance::DoYield(bool bWait, bool 
bHandleAllCurrentEvents)
         NSTimeInterval now = [[NSProcessInfo processInfo] systemUptime];
         mbTimerProcessed = false;
 
+        int noLoops = 0;
         do
         {
             SolarMutexReleaser aReleaser;
@@ -608,6 +609,12 @@ bool AquaSalInstance::DoYield(bool bWait, bool 
bHandleAllCurrentEvents)
 
             if ( !bHandleAllCurrentEvents || !pEvent || now < [pEvent 
timestamp] )
                 break;
+            // noelgrandin: I see sporadic hangs on the macos jenkins boxes, 
and the backtrace
+            // points to the this loop - let us see if breaking out of here 
after too many
+            // trips around helps.
+            noLoops++;
+            if (noLoops == 100)
+                break;
         }
         while( true );
 

Reply via email to