Skip to content

draft of setting executor service capability - #1

Open
cosgroved wants to merge 1 commit into
habanero-rice:masterfrom
cosgroved:custom-executor-service
Open

draft of setting executor service capability#1
cosgroved wants to merge 1 commit into
habanero-rice:masterfrom
cosgroved:custom-executor-service

Conversation

@cosgroved

Copy link
Copy Markdown

No description provided.

@agrippa agrippa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove commented code.

tryComplete();
Runtime.popTask();
awaitCompletion();
//awaitCompletion();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove commented code.

}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove white space

import edu.rice.pcdp.runtime.Runtime;

public class ArraySumDivideAndConquerTest {
// private void arraySumLowerUpperSplit(int[] array, int min, int maxExclusive) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this should be deleted as well?

taskPool = new ForkJoinPool(numWorkers);
}

public static void setExecutorService( ExecutorService executorService ) throws InterruptedException {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A javadoc comment would be very helpful. See resizeWorkerThreads above for an example.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants