[Libreoffice-commits] core.git: 2 commits - include/osl sw/source
Michael Meeks
michael.meeks at collabora.com
Fri Nov 25 09:23:58 UTC 2016
include/osl/conditn.h | 5 ++++-
include/osl/conditn.hxx | 11 ++++++++++-
sw/source/core/ole/ndole.cxx | 13 ++++---------
3 files changed, 18 insertions(+), 11 deletions(-)
New commits:
commit ab45b41efe1109e015ecfcb670547d44026e4764
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Thu Nov 24 21:40:01 2016 +0000
osl::Condition - add deprecated markup. Use std::condition_variable.
Change-Id: Id3488a46b12d41bada2711b135ca955259d6e448
Reviewed-on: https://gerrit.libreoffice.org/31176
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
Tested-by: Michael Meeks <michael.meeks at collabora.com>
diff --git a/include/osl/conditn.h b/include/osl/conditn.h
index c008798..d0c56a3 100644
--- a/include/osl/conditn.h
+++ b/include/osl/conditn.h
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#ifndef INCLUDED_OSL_CONDITN_H
#define INCLUDED_OSL_CONDITN_H
@@ -40,6 +39,10 @@ typedef enum {
} oslConditionResult;
/** Creates a condition.
+
+ @deprecated use C++11's std::condition_variable instead
+ for a more robust and helpful condition.
+
The condition is in the reset-state.
@returns 0 if condition could not be created.
*/
diff --git a/include/osl/conditn.hxx b/include/osl/conditn.hxx
index 2e91dd0..bc96e2f 100644
--- a/include/osl/conditn.hxx
+++ b/include/osl/conditn.hxx
@@ -32,6 +32,11 @@
namespace osl
{
/**
+ * A deprecated condition.
+ *
+ * @deprecated use C++11's std::condition_variable instead
+ * for a more robust and helpful condition.
+ *
* Warning: the Condition abstraction is inadequate for any
* situation where there may be multiple threads setting,
* waiting, and resetting the same condition. It can only be
@@ -50,7 +55,11 @@ namespace osl
result_timeout = osl_cond_result_timeout
};
- /* Create a condition.
+ /**
+ * Create a condition.
+ *
+ * @deprecated use C++11's std::condition_variable instead
+ * for a more robust and helpful condition.
*/
Condition()
{
commit 17320183bdcaca335c339eecbba1b660bcc53c96
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Thu Nov 24 11:28:53 2016 +0000
sw: avoid busy loop waiting for OLE objects to load.
Change-Id: I7f26a88d3dcdb47260eb95f7803702d55f4a9119
Reviewed-on: https://gerrit.libreoffice.org/31164
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
Tested-by: Michael Meeks <michael.meeks at collabora.com>
diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx
index 21dbd0f..a235bfd 100644
--- a/sw/source/core/ole/ndole.cxx
+++ b/sw/source/core/ole/ndole.cxx
@@ -686,15 +686,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);
}
};
More information about the Libreoffice-commits
mailing list