code: int adjustPoolSize(int poolSize, int poolAdjustment) {
          if (threadPool == null)
              return poolSize; // arguably should return 0, but "least change" is safer... This happens during shutdown.
  
          int newPoolSize = poolSize + poolAdjustment;
          lastAction = LastAction.NONE;
  
          if (poolAdjustment != 0) {
              // don't shrink below coreThreads
              if (poolAdjustment < 0 && newPoolSize >= coreThreads) {
                  lastAction = LastAction.SHRINK;
                  setPoolSize(newPoolSize);
              } else if (poolAdjustment > 0 && newPoolSize <= maxThreads) {
                  lastAction = LastAction.GROW;
                  setPoolSize(newPoolSize);
              } else {
                  newPoolSize = poolSize;
              }
          }
  
          return newPoolSize;
      }
docs: Adjust the size of the thread pool.
  
  @param poolSize the current pool size
  @param poolAdjustment the change to make to the pool
  
  @return the new pool size