summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew J. Francis <mjay.francis@gmail.com>2014-11-27 12:08:07 +0800
committerMichael Meeks <michael.meeks@collabora.com>2014-11-27 13:31:17 +0000
commitd83b031346799bff0a3298387f76b16baad2e5cf (patch)
treef65f813ab74a7de2a9e651293a1d438919ff5238
parent6fc36030e2678ca3bad0fcca0c22289c866bdb21 (diff)
fdo#86687 Avoid deadlock updating progress bar
Change-Id: I13f93372fedc67bfd25d36a5bee10a004fe9f8f6 Reviewed-on: https://gerrit.libreoffice.org/13147 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r--sc/source/filter/excel/xetable.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx
index 01c286df968d..66df5d65a8e1 100644
--- a/sc/source/filter/excel/xetable.cxx
+++ b/sc/source/filter/excel/xetable.cxx
@@ -2087,9 +2087,12 @@ void XclExpRowBuffer::Finalize( XclExpDefaultRowData& rDefRowData, const ScfUInt
for ( itr = itrBeg; itr != itrEnd; ++itr, ++nIdx )
pTasks[ nIdx % nThreads ]->push_back( itr->second.get() );
- for ( size_t i = 0; i < nThreads; i++ )
+ for ( size_t i = 1; i < nThreads; i++ )
rPool.pushTask( pTasks[ i ] );
+ // Progress bar updates must be synchronous to avoid deadlock
+ pTasks[0]->doWork();
+
rPool.waitUntilEmpty();
}