title: Is it not possible to supply a thread facory or name pattern to ForkJoinPool?
body: <p>I would like to set name for threads of the ForkJoinPool used by work stealing pool, supplied by</p>
  
  <pre><code>ExecutorService newWorkStealingPool(int parallelism)
  </code></pre>
  
  <p>or</p>
  
  <pre><code>ExecutorService newWorkStealingPool()
  </code></pre>
  
  <p>So far I could not find a way to set custom names on threads used by this <code>ExecutorService</code>, is there a way?</p>
  
  <p><code>newWorkStealingPool()</code> basically supplies a <code>ForkJoinPool</code>, but <code>ForkJoinPool</code> also doesn't have a public constructor with supplied name pattern.</p>
  
  <p><strong>update</strong>:
  I have now found this constructor of
  <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ForkJoinPool.html#ForkJoinPool-int-java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory-java.lang.Thread.UncaughtExceptionHandler-boolean-" rel="noreferrer"><code>ForkJoinPool</code></a> which takes a thread factory <code>ForkJoinPool.ForkJoinWorkerThreadFactory</code>. But factory should return a <code>ForkJoinWorkerThread</code>, which doesn't have a public constructor. So I guess I will have to subclass <code>ForkJoinWorkerThread</code>.</p>