diff options
author | Dennis Francis <dennis.francis@collabora.com> | 2019-03-20 20:07:58 +0530 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2019-03-21 11:24:26 +0100 |
commit | 769832cc1f592b1d0c39cda7795fe4548fc97566 (patch) | |
tree | 404546dfca76bc766ad88fcf9fe8f3cb5f7ad3f1 /sc/source/core/data/formulacell.cxx | |
parent | 3d9f973e6648c5819608237f390df523b6a32ed8 (diff) |
Increase the life-cycle of threads in thread-pool...
to ScDocument lifetime if possible. This helps to avoid lots
of thread setup-cost while doing recalcs especially if there are
many formula-groups in the document and most of them are fairly
light-weight.
Change-Id: Idd57e1ebd0d4e492f99e31237d4a55ec9c95a121
Reviewed-on: https://gerrit.libreoffice.org/69473
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'sc/source/core/data/formulacell.cxx')
-rw-r--r-- | sc/source/core/data/formulacell.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index 17dc29811ae5..9edddf0bfc54 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -4758,8 +4758,10 @@ bool ScFormulaCell::InterpretFormulaGroupThreading(sc::FormulaLogger::GroupScope nStartOffset, nEndOffset)); } - SAL_INFO("sc.threaded", "Joining threads"); - rThreadPool.waitUntilDone(aTag); + SAL_INFO("sc.threaded", "Waiting for threads to finish work"); + // Do not join the threads here. They will get joined in ScDocument destructor + // if they don't get joined from elsewhere before (via ThreadPool::waitUntilDone). + rThreadPool.waitUntilDone(aTag, false); pDocument->SetThreadedGroupCalcInProgress(false); |