comphelper/source/misc/threadpool.cxx |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

New commits:
commit 9bc65c2c93230b799cab85ec29dc3fdd6da855ea
Author: Matúš Kukan <[email protected]>
Date:   Tue Nov 4 14:57:39 2014 +0100

    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 @@ 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;
_______________________________________________
Libreoffice-commits mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to