src/network/kernel/qhostinfo.cpp
changeset 23 89e065397ea6
parent 19 fcece45ef507
child 25 e24348a560a6
--- a/src/network/kernel/qhostinfo.cpp	Fri May 14 16:40:13 2010 +0300
+++ b/src/network/kernel/qhostinfo.cpp	Thu May 27 13:40:48 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;