code: static ThreadFactory newDaemonThreadFactory(final String prefix) {
      final ThreadFactory namedFactory = getNamedThreadFactory(prefix);
      return new ThreadFactory() {
        @Override
        public Thread newThread(Runnable r) {
          Thread t = namedFactory.newThread(r);
          if (!t.isDaemon()) {
            t.setDaemon(true);
          }
          if (t.getPriority() != Thread.NORM_PRIORITY) {
            t.setPriority(Thread.NORM_PRIORITY);
          }
          return t;
        }
  
      };
    }
docs: Get a named {@link ThreadFactory} that just builds daemon threads.
  
  @param prefix name prefix for all threads created from the factory
  @return a thread factory that creates named, daemon threads with
  the supplied exception handler and normal priority