code: public Thread newThread(Runnable runnable)
      {
          Thread thread = new Thread(runnable, nameGenerator.nextID());
          thread.setPriority(priority);
          thread.setDaemon(daemon);
          thread.setUncaughtExceptionHandler(uncaughtExceptionHandler);
          return thread;
      }
docs: Creates a new thread configured according to this factory's parameters.
  @param runnable The runnable to be executed by the new thread.
  @return The created thread.