summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2018-07-18 12:23:10 +0100
committerMichael Meeks <michael.meeks@collabora.com>2018-07-18 22:28:51 +0200
commit5bfdbc664072dbf2731365b237b60eba2b3e03fb (patch)
tree9a05c9c1b7c94bf3ed39b369732c5c00c5aff4b1 /desktop
parent98fdac1e1f7dcba40b1d3a1cd5662f23160a0881 (diff)
Allow the comphelper threadpool to be reset after construction.
Otherwise some pre-init components can start it, and threads get stranded in the forkit process causing grief. Change-Id: Ib1846f8b329b4c6b84645999dafba1252c5129c7 Reviewed-on: https://gerrit.libreoffice.org/57631 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/init.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index fc4705233195..0b3582f8c07c 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -36,6 +36,7 @@
#include <comphelper/string.hxx>
#include <comphelper/propertysequence.hxx>
#include <comphelper/scopeguard.hxx>
+#include <comphelper/threadpool.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
@@ -3968,7 +3969,10 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char
}
if (eStage == PRE_INIT)
+ {
+ comphelper::ThreadPool::getSharedOptimalPool().shutdown();
rtl_alloc_preInit(rtlAllocPostInit);
+ }
return bInitialized;
}