# ForkJoinPool.ForkJoinWorkerThreadFactory

public static interface **ForkJoinPool.ForkJoinWorkerThreadFactory** Factory for creating new `https://developers.google.com/j2objc/javadoc/jre/reference/java/util/concurrent/ForkJoinWorkerThread.html`s.
A `ForkJoinWorkerThreadFactory` must be defined and used
for `ForkJoinWorkerThread` subclasses that extend base
functionality or initialize threads with different contexts.

### Public Method Summary

|---|---|
| abstract [ForkJoinWorkerThread](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/concurrent/ForkJoinWorkerThread.html) | [newThread](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/concurrent/ForkJoinPool.ForkJoinWorkerThreadFactory.html#newThread(java.util.concurrent.ForkJoinPool))([ForkJoinPool](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/concurrent/ForkJoinPool.html) pool) Returns a new worker thread operating in the given pool. |

## Public Methods

#### public abstract [ForkJoinWorkerThread](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/concurrent/ForkJoinWorkerThread.html)
**newThread**
([ForkJoinPool](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/concurrent/ForkJoinPool.html) pool)

Returns a new worker thread operating in the given pool.

##### Parameters

| pool | the pool this thread works in |
|---|---|

##### Returns

- the new worker thread, or `null` if the request to create a thread is rejected

##### Throws

| [NullPointerException](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/NullPointerException.html) | if the pool is null |
|---|---|