Code example for ThreadFactory

Methods: newThread

0
 
    final ThreadFactory parent = executor.getThreadFactory();
    executor.setThreadFactory(new ThreadFactory() {
      @Override 
      public Thread newThread(final Runnable task) {
        final Thread t = parent.newThread(task);
        t.setPriority(Thread.MIN_PRIORITY);
        return t;
      } 
    }); 
    return executor;
  } 
} 
Connect your IDE to all the code out there  Get Codota for Java