diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2016-11-24 11:28:53 +0000 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2017-02-17 12:27:36 +0100 |
commit | b906734764e8bc20e504c521e3097ea3a5c3192a (patch) | |
tree | 2f0691fa938d196add4a7255950dabcd14227144 /sw | |
parent | 48e2fb1c34e6f95ae934f46d12b13712b02ea53c (diff) |
sw: avoid busy loop waiting for OLE objects to load.
Change-Id: I7f26a88d3dcdb47260eb95f7803702d55f4a9119
Reviewed-on: https://gerrit.libreoffice.org/31164
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
(cherry picked from commit 17320183bdcaca335c339eecbba1b660bcc53c96)
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/ole/ndole.cxx | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx index 7cb6448853c6..8b6b20816334 100644 --- a/sw/source/core/ole/ndole.cxx +++ b/sw/source/core/ole/ndole.cxx @@ -690,15 +690,10 @@ public: void waitFinished() { - while(!isFinished() && !mbKilled) - { - // need to wait until the load in progress is finished. - // to do so, Application::Yield() is needed since the execution - // here means that the SolarMutex is locked, but the - // WorkerThreads need it to be able to continue and finish - // the running import - Application::Yield(); - } + // need to wait until the load in progress is finished. + // WorkerThreads need the SolarMutex to be able to continue + // and finish the running import. + SolarMutexReleaser aReleaser; comphelper::ThreadPool::getSharedOptimalPool().waitUntilDone(mpTag); } }; |