draft of setting executor service capability - #1
Conversation
agrippa
left a comment
There was a problem hiding this comment.
Just left a few comments. I'd also just add that the commit message should be something like "Enable configurable executor services" rather than saying this is a draft. Also, did you want to add your change around ignoring Eclipse files?
| public static void async(final Runnable runnable) { | ||
| final FutureTask<Void> newTask = createFutureTask(runnable); | ||
| newTask.fork(); | ||
| //newTask.fork(); |
| tryComplete(); | ||
| Runtime.popTask(); | ||
| awaitCompletion(); | ||
| //awaitCompletion(); |
| } | ||
| } | ||
|
|
||
| import edu.rice.pcdp.runtime.Runtime; | ||
|
|
||
| public class ArraySumDivideAndConquerTest { | ||
| // private void arraySumLowerUpperSplit(int[] array, int min, int maxExclusive) { |
There was a problem hiding this comment.
Looks like this should be deleted as well?
| taskPool = new ForkJoinPool(numWorkers); | ||
| } | ||
|
|
||
| public static void setExecutorService( ExecutorService executorService ) throws InterruptedException { |
There was a problem hiding this comment.
A javadoc comment would be very helpful. See resizeWorkerThreads above for an example.
There was a problem hiding this comment.
In addition to just the standard documentation, it might even be helpful to add a note on common use cases of this capability (which for now would just be your use of cached thread pool) and explanations of why these other executor services might be preferrable.
No description provided.