code: public void setCorePoolSize(int corePoolSize) {
          if (corePoolSize < 0)
              throw new IllegalArgumentException();
          int delta = corePoolSize - this.corePoolSize;
          this.corePoolSize = corePoolSize;
          if (workerCountOf(ctl.get()) > corePoolSize)
              interruptIdleWorkers();
          else if (delta > 0) {
              // We don't really know how many new threads are "needed".
              // As a heuristic, prestart enough new workers (up to new
              // core size) to handle the current number of tasks in
              // queue, but stop if queue becomes empty while doing so.
              int k = Math.min(delta, workQueue.size());
              while (k-- > 0 && addWorker(null, true)) {
                  if (workQueue.isEmpty())
                      break;
              }
          }
      }
docs: exec.setMaxPoolSize(N);