code: public Thread newThread(String name, Runnable task) {
      Assert.hasText(name, "Thread name must be specified");
      Assert.notNull(task, "Thread task must not be null");
  
      Thread thread = new Thread(getThreadGroup(), task, name);
  
      thread.setContextClassLoader(getContextClassLoader());
      thread.setDaemon(isDaemon());
      thread.setPriority(getPriority());
      thread.setUncaughtExceptionHandler(getUncaughtExceptionHandler());
  
      return thread;
    }
docs: Constructs and initializes a new {@link Thread}.
  
  @param name name given to the new {@link Thread}.
  @param task {@link Runnable} task for the {@link Thread} to execute.
  @return a new {@link Thread} initialized by this factory.
  @throws IllegalArgumentException if {@code name} is unspecified or {@link Runnable} task is {@literal null}.
  @see java.lang.Thread