code: public void shutdown() {
          if (isShutdown.compareAndSet(false, true)) {
              executorService.shutdown();
              if (autoScaler != null) {
                  autoScaler.shutdown();
              }
          }
      }
docs: Mark task scheduler as shutdown and shutdown any thread pool executors created.