summaryrefslogtreecommitdiff
path: root/configmgr
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2008-06-16 13:05:14 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2008-06-16 13:05:14 +0000
commitdba248dd756b91c1bc7048cc5522c595a9cf77f8 (patch)
treec8e12a33273cc5ae06577004e3db1ec15dd6ac9d /configmgr
parent142b1f43b5094e018abe2f441d2626845b640111 (diff)
INTEGRATION: CWS sb88 (1.23.10); FILE MERGED
2008/06/10 13:04:49 sb 1.23.10.1: #157123# replace sole (exception handling) call to asynchronous CacheController::invalidateComponent with call to synchronous CacheController::refreshComponent, to avoid multi-threading issues
Diffstat (limited to 'configmgr')
-rw-r--r--configmgr/source/treecache/invalidatetree.cxx67
1 files changed, 1 insertions, 66 deletions
diff --git a/configmgr/source/treecache/invalidatetree.cxx b/configmgr/source/treecache/invalidatetree.cxx
index e923aca3a8..6aebc7cb51 100644
--- a/configmgr/source/treecache/invalidatetree.cxx
+++ b/configmgr/source/treecache/invalidatetree.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: invalidatetree.cxx,v $
- * $Revision: 1.23 $
+ * $Revision: 1.24 $
*
* This file is part of OpenOffice.org.
*
@@ -41,7 +41,6 @@
#include "tracer.hxx"
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/container/NoSuchElementException.hpp>
-#include <vos/thread.hxx>
#ifndef INCLUDED_ALGORITHM
#include <algorithm>
@@ -111,55 +110,6 @@ std::auto_ptr<ISubtree> TreeManager::loadNodeFromSession( AbsolutePath const& _a
#endif
// -----------------------------------------------------------------------------
-class OInvalidateTreeThread: public vos::OThread
-{
- typedef backend::ICachedDataProvider CacheManager;
- typedef rtl::Reference< CacheManager > CacheManagerRef;
- CacheManagerRef m_rTreeManager;
- Name m_aComponentName;
- RequestOptions m_aOptions;
-
-public:
- OInvalidateTreeThread(CacheManager* _rTreeManager,
- Name const & _aComponentName,
- const RequestOptions& _aOptions)
- : m_rTreeManager(_rTreeManager)
- , m_aComponentName(_aComponentName)
- , m_aOptions(_aOptions)
- {}
-
- ~OInvalidateTreeThread()
- {}
-
-private:
- virtual void SAL_CALL onTerminated()
- {
- delete this;
- }
-
- virtual void SAL_CALL run();
-};
-
-// -----------------------------------------------------------------------------
-
-void CacheController::invalidateComponent(ComponentRequest const & _aComponent) CFG_UNO_THROW_ALL( )
-{
- if (!this->m_bDisposing)
- {
- // start the InvalidateTreeThread only, if we are not at disposemode
- if (OInvalidateTreeThread *pThread =
- new OInvalidateTreeThread(this, _aComponent.getComponentName(), _aComponent.getOptions()))
- {
- pThread->create();
- }
- else
- OSL_ENSURE(false, "Could not create refresher thread");
- }
-
-}
-
-// -----------------------------------------------------------------------------
-
CacheLocation CacheController::refreshComponent(ComponentRequest const & _aRequest) CFG_UNO_THROW_ALL()
{
if (m_bDisposing) return NULL;
@@ -223,21 +173,6 @@ CacheLocation CacheController::refreshComponent(ComponentRequest const & _aReque
}
// -----------------------------------------------------------------------------
-void OInvalidateTreeThread::run()
-{
- try
- {
- UnoApiLock aLock;
- ComponentRequest aRequest(m_aComponentName, m_aOptions);
- m_rTreeManager->refreshComponent(aRequest);
- }
- catch(uno::Exception&)
- {
- // do nothing, only thread safe exception absorb
- CFG_TRACE_ERROR_NI("OInvalidateTreeThread::run: refreshing failed - ignoring the exception");
- }
-}
-// -----------------------------------------------------------------------------
} // namespace backend
// -----------------------------------------------------------------------------