equal
deleted
inserted
replaced
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 }; |