thread-pool: Fix previous broken commit; This looks better
Change-Id: Ieb84adba0b0a9004f025bdb7e57eb01c37d7ce8d
diff --git a/comphelper/source/misc/threadpool.cxx b/comphelper/source/misc/threadpool.cxx
index 39c4e73..77e9962 100644
--- a/comphelper/source/misc/threadpool.cxx
+++ b/comphelper/source/misc/threadpool.cxx
@@ -99,7 +99,7 @@
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 @@
{
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;