src/network/kernel/qhostinfo.cpp
branchRCL_3
changeset 14 c0432d11811c
parent 8 3f74d0d4af4c
child 25 e24348a560a6
equal deleted inserted replaced
13:cc75c76972ee 14:c0432d11811c
   549                     scheduled = 0;
   549                     scheduled = 0;
   550                     break;
   550                     break;
   551                 }
   551                 }
   552             }
   552             }
   553 
   553 
   554             if (scheduled && threadPool.tryStart(scheduled)) {
   554             if (scheduled && currentLookups.size() < threadPool.maxThreadCount()) {
   555                 // runnable now running in new thread, track this in currentLookups
   555                 // runnable now running in new thread, track this in currentLookups
       
   556                 threadPool.start(scheduled);
   556                 iterator.remove();
   557                 iterator.remove();
   557                 currentLookups.append(scheduled);
   558                 currentLookups.append(scheduled);
   558             } else if (scheduled) {
       
   559                 // wanted to start, but could not because thread pool is busy
       
   560                 break;
       
   561             } else {
   559             } else {
   562                 // was postponed, continue iterating
   560                 // was postponed, continue iterating
   563                 continue;
   561                 continue;
   564             }
   562             }
   565         };
   563         };