protected boolean needThread(){
  int bound=(int)(loadFactor * threads.size());
  int max=tasks.size();
  if (max < bound)   return false;
  max--;
  if (runAfter(tasks.get(max),max))   return false;
  int ready=firstPending + 1;
  if (ready > bound)   return true;
  for (int i=firstPending; i < max; i++) {
    if (!runAfter(tasks.get(i),i)) {
      ready++;
      if (ready > bound)       return true;
    }
  }
  return false;
}

protected boolean needThread ( ) { int bound = ( int ) ( loadFactor * threads . size ( ) ) ; int max = tasks . size ( ) ; if ( max < bound ) return false ; max -- ; if ( runAfter ( tasks . get ( max ) , max ) ) return false ; int ready = firstPending + 1 ; if ( ready > bound ) return true ; for ( int i = firstPending ; i < max ; i ++ ) { if ( ! runAfter ( tasks . get ( i ) , i ) ) { ready ++ ; if ( ready > bound ) return true ; } } return false ; }
return true if a new thread should be created ( ignoring maxthreads ) .
