# HG changeset patch # User Benoit Daloze # Date 1440580287 -7200 # Node ID 8542dc50f64c4c61aa5e211a6df26aa8e9da23af # Parent 37382f5ba5665f1fc3d9bc34b1d7656484d52210 use the Executors factory method to create a fixed thread pool diff -r 37382f5ba566 -r 8542dc50f64c graal/com.oracle.graal.truffle.hotspot/src/com/oracle/graal/truffle/hotspot/HotSpotTruffleRuntime.java --- a/graal/com.oracle.graal.truffle.hotspot/src/com/oracle/graal/truffle/hotspot/HotSpotTruffleRuntime.java Wed Aug 26 10:56:02 2015 +0200 +++ b/graal/com.oracle.graal.truffle.hotspot/src/com/oracle/graal/truffle/hotspot/HotSpotTruffleRuntime.java Wed Aug 26 11:11:27 2015 +0200 @@ -77,7 +77,7 @@ } private Map> compilations = newIdentityMap(); - private final ThreadPoolExecutor compileQueue; + private final ExecutorService compileQueue; private final Map callTargets = Collections.synchronizedMap(new WeakHashMap()); private static final long THREAD_EETOP_OFFSET = eetopOffset(); @@ -111,8 +111,7 @@ } } selectedProcessors = Math.max(1, selectedProcessors); - compileQueue = new ThreadPoolExecutor(selectedProcessors, selectedProcessors, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue(), factory); - + compileQueue = Executors.newFixedThreadPool(selectedProcessors, factory); } @Override