/src/main/java/net/finmath/montecarlo/interestrate/products/components/AbstractProductComponent.java
private static ThreadPoolExecutor executor = new ThreadPoolExecutor( Runtime.availableProcessors( ).availableProcessors( ) , Runtime.getRuntime( ).availableProcessors( ) , 10L, TimeUnit.SECONDS, new SynchronousQueue<Runnable>( ) , new ThreadFactory( ) {
private static ThreadPoolExecutor executor = new ThreadPoolExecutor ( Runtime.getRuntime ( ) .availableProcessors ( ) , Runtime.getRuntime ( ) .availableProcessors ( ) , 10L, TimeUnit.SECONDS, new SynchronousQueue<Runnable> ( ) , new ThreadFactory ( ) {
import net.finmath.exception.CalculationException; import net.finmath.montecarlo.interestrate.TermStructureMonteCarloSimulationModel; import net.finmath.montecarlo.interestrate.products.AbstractTermStructureMonteCarloProduct; import net.finmath.stochastic.RandomVariable; public abstract class AbstractProductComponent extends AbstractTermStructureMonteCarloProduct implements Serializable { private static final long serialVersionUID = -916286619811716575L; <extra_id_0> @Override public Thread newThread(final Runnable runnable) { final Thread thread = Executors.defaultThreadFactory().newThread(runnable); thread.setDaemon(true); return thread; }