summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2018-07-18 12:23:10 +0100
committerJan Holesovsky <kendy@collabora.com>2018-07-18 17:34:13 +0200
commitd69e830fb874582459134d483e7698d9dad805c6 (patch)
tree31089c3a6972e594c9b6c372c2815117c878f65b /comphelper
parent1c8264b4a3305c3f4fcde726a3516bb58fff326a (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/57634 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/misc/threadpool.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/comphelper/source/misc/threadpool.cxx b/comphelper/source/misc/threadpool.cxx
index 23e363213206..457b7282fced 100644
--- a/comphelper/source/misc/threadpool.cxx
+++ b/comphelper/source/misc/threadpool.cxx
@@ -126,13 +126,12 @@ sal_Int32 ThreadPool::getPreferredConcurrency()
return ThreadCount;
}
-// FIXME: there should be no need for this as/when our baseline
-// is >VS2015 and drop WinXP; the sorry details are here:
-// https://connect.microsoft.com/VisualStudio/feedback/details/1282596
+// Used to order shutdown, and to ensure there are no lingering
+// threads after LibreOfficeKit pre-init.
void ThreadPool::shutdown()
{
- if (mbTerminate)
- return;
+// if (mbTerminate)
+// return;
std::unique_lock< std::mutex > aGuard( maMutex );
shutdownLocked(aGuard);