Kaydet (Commit) d83b0313 authored tarafından Matthew J. Francis's avatar Matthew J. Francis Kaydeden (comit) Michael Meeks

fdo#86687 Avoid deadlock updating progress bar

Change-Id: I13f93372fedc67bfd25d36a5bee10a004fe9f8f6
Reviewed-on: https://gerrit.libreoffice.org/13147Reviewed-by: 's avatarMichael Meeks <michael.meeks@collabora.com>
Tested-by: 's avatarMichael Meeks <michael.meeks@collabora.com>
üst 6fc36030
...@@ -2087,9 +2087,12 @@ void XclExpRowBuffer::Finalize( XclExpDefaultRowData& rDefRowData, const ScfUInt ...@@ -2087,9 +2087,12 @@ void XclExpRowBuffer::Finalize( XclExpDefaultRowData& rDefRowData, const ScfUInt
for ( itr = itrBeg; itr != itrEnd; ++itr, ++nIdx ) for ( itr = itrBeg; itr != itrEnd; ++itr, ++nIdx )
pTasks[ nIdx % nThreads ]->push_back( itr->second.get() ); 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 ] ); rPool.pushTask( pTasks[ i ] );
// Progress bar updates must be synchronous to avoid deadlock
pTasks[0]->doWork();
rPool.waitUntilEmpty(); rPool.waitUntilEmpty();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment