Package io.quarkus.bootstrap.forkjoin
Class QuarkusForkJoinWorkerThreadFactory
java.lang.Object
io.quarkus.bootstrap.forkjoin.QuarkusForkJoinWorkerThreadFactory
- All Implemented Interfaces:
ForkJoinPool.ForkJoinWorkerThreadFactory
public final class QuarkusForkJoinWorkerThreadFactory
extends Object
implements ForkJoinPool.ForkJoinWorkerThreadFactory
This implementation of JDK's ForkJoinPool.ForkJoinWorkerThreadFactory
needs to be enabled by setting system property
java.util.concurrent.ForkJoinPool.common.threadFactory
to this class name, so to allow Quarkus to set the contextual classloader to the correct
runtime classloader for each thread being started by the common pool.
Otherwise the system classloader will be set, which is unable to load all application resources.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
QuarkusForkJoinWorkerThreadFactory
public QuarkusForkJoinWorkerThreadFactory()
-
-
Method Details
-
newThread
- Specified by:
newThreadin interfaceForkJoinPool.ForkJoinWorkerThreadFactory
-