src/network/kernel/qhostinfo.cpp
branchRCL_3
changeset 14 c0432d11811c
parent 8 3f74d0d4af4c
child 25 e24348a560a6
--- a/src/network/kernel/qhostinfo.cpp	Wed Apr 21 12:15:23 2010 +0300
+++ b/src/network/kernel/qhostinfo.cpp	Wed Apr 21 20:15:53 2010 +0300
@@ -551,13 +551,11 @@
                 }
             }
 
-            if (scheduled && threadPool.tryStart(scheduled)) {
+            if (scheduled && currentLookups.size() < threadPool.maxThreadCount()) {
                 // runnable now running in new thread, track this in currentLookups
+                threadPool.start(scheduled);
                 iterator.remove();
                 currentLookups.append(scheduled);
-            } else if (scheduled) {
-                // wanted to start, but could not because thread pool is busy
-                break;
             } else {
                 // was postponed, continue iterating
                 continue;