summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--comphelper/source/misc/threadpool.cxx6
1 files changed, 1 insertions, 5 deletions
diff --git a/comphelper/source/misc/threadpool.cxx b/comphelper/source/misc/threadpool.cxx
index 39c4e73fa3e7..77e9962c6e9c 100644
--- a/comphelper/source/misc/threadpool.cxx
+++ b/comphelper/source/misc/threadpool.cxx
@@ -99,7 +99,7 @@ ThreadPool::ThreadPool( sal_Int32 nWorkers ) :
for( sal_Int32 i = 0; i < nWorkers; i++ )
maWorkers.push_back( new ThreadWorker( this ) );
- maTasksComplete.reset();
+ maTasksComplete.set();
osl::MutexGuard aGuard( maGuard );
for( size_t i = 0; i < maWorkers.size(); i++ )
@@ -187,10 +187,6 @@ void ThreadPool::waitUntilEmpty()
{
osl::ResettableMutexGuard aGuard( maGuard );
- // Avoid deadlock when there are no working threads
- if( maTasks.empty() )
- return;
-
if( maWorkers.empty() )
{ // no threads at all -> execute the work in-line
ThreadTask *pTask;