code: public ScanResult scan(final int numThreads) {
          try (AutoCloseableExecutorService executorService = new AutoCloseableExecutorService(numThreads)) {
              return scan(executorService, numThreads);
          }
      }
docs: Scans the classpath with the requested number of threads, blocking until the scan is complete. You should
  assign the returned {@link ScanResult} in a try-with-resources statement, or manually close it when you are
  finished with it.
  
  @param numThreads
  The number of worker threads to start up.
  @return a {@link ScanResult} object representing the result of the scan.
  @throws ClassGraphException
  if any of the worker threads throws an uncaught exception, or the scan was interrupted.