linguistic/source/gciterator.cxx |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 42f8b7ab7f76676987e5b3aabedffcc3466bcaed
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Tue Sep 17 14:10:27 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Wed Sep 18 22:13:23 2024 +0200

    reset m_bEnd after use to quit lcl_workerfunc
    
    so lcl_workerfunc can be launched again on-demand
    
    Change-Id: I23dd48dc433190413f5c63464dcce112128b81ad
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173564
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Michael Meeks <michael.me...@collabora.com>
    (cherry picked from commit fd88a5bcb271a1711f484a319ee23d6b7013b232)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173502
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Tested-by: Jenkins

diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx
index 2c8f5f4dbb3b..2077c4dc4328 100644
--- a/linguistic/source/gciterator.cxx
+++ b/linguistic/source/gciterator.cxx
@@ -310,9 +310,14 @@ void GrammarCheckingIterator::TerminateThread()
         osl_joinWithThread(t);
         osl_destroyThread(t);
     }
+    // After m_bEnd was used to flag lcl_workerfunc to quit, now
+    // reset it so lcl_workerfunc could be relaunched later.
+    {
+        ::osl::Guard< ::osl::Mutex > aGuard( MyMutex() );
+        m_bEnd = false;
+    }
 }
 
-
 bool GrammarCheckingIterator::joinThreads()
 {
     TerminateThread();

Reply via email to